Merge branch 'py3_others' into 'pyren3'
fix ddt settings.p to settings3.p optimise environement (venv) See merge request py_ren/pyren!24
This commit is contained in:
commit
5131ca9a41
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
/.idea/
|
/.idea/
|
||||||
/.DS_Store
|
|
||||||
/EcuDacia/
|
/EcuDacia/
|
||||||
/EcuRsm/
|
/EcuRsm/
|
||||||
/Output/
|
/Output/
|
||||||
@ -22,6 +21,9 @@ MTCSAVE/
|
|||||||
NML/
|
NML/
|
||||||
Params/
|
Params/
|
||||||
Python27/
|
Python27/
|
||||||
|
/build/
|
||||||
|
/.intino/
|
||||||
|
/venv/
|
||||||
*.pyc
|
*.pyc
|
||||||
*.p
|
*.p
|
||||||
*.zip
|
*.zip
|
||||||
@ -29,9 +31,9 @@ Python27/
|
|||||||
*.acf
|
*.acf
|
||||||
*.tdv
|
*.tdv
|
||||||
*.bin
|
*.bin
|
||||||
|
*.DS_Store
|
||||||
pyren3/history.txt
|
pyren3/history.txt
|
||||||
pyren3/parser.out
|
pyren3/parser.out
|
||||||
pyren3/parsetab.py
|
pyren3/parsetab.py
|
||||||
pyren3/scen_appr_4valves.py
|
pyren3/scen_appr_4valves.py
|
||||||
pyren3/scen_ecri_fap2.py
|
pyren3/scen_ecri_fap2.py
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo Run's app ...
|
echo Run's app ...
|
||||||
python27\python.exe _pyren_launcher.py
|
rem uses python3
|
||||||
|
python3.exe _pyren3_launcher.py
|
||||||
pause
|
pause
|
BIN
icons/obd.png
Normal file
BIN
icons/obd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
BIN
icons/splash_pyren3.png
Normal file
BIN
icons/splash_pyren3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
12
main.py
12
main.py
@ -12,6 +12,14 @@
|
|||||||
# #
|
# #
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
|
__author__ = "Shr-Lnm"
|
||||||
|
__copyright__ = "Copyright 2018-2022"
|
||||||
|
__credits__ = []
|
||||||
|
# __license__ = "GNU" # Unknown licence!
|
||||||
|
__version__ = "3.0.0" # python3 maybe ?
|
||||||
|
__maintainer__ = "Shr-Lnm"
|
||||||
|
__email__ = "mshkn@inbox.ru"
|
||||||
|
__status__ = "Beta"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@ -36,7 +44,6 @@ for f in listdir('.'):
|
|||||||
sys.path.append(os.path.join(currenPath, f))
|
sys.path.append(os.path.join(currenPath, f))
|
||||||
sys.path.append(os.path.join(currenPath, f, "serial"))
|
sys.path.append(os.path.join(currenPath, f, "serial"))
|
||||||
|
|
||||||
|
|
||||||
if osname == 'nt':
|
if osname == 'nt':
|
||||||
import pip
|
import pip
|
||||||
|
|
||||||
@ -81,6 +88,7 @@ if osname == 'android':
|
|||||||
print("Error while using jnius")
|
print("Error while using jnius")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
def update_from_gitlab():
|
def update_from_gitlab():
|
||||||
try:
|
try:
|
||||||
import os
|
import os
|
||||||
@ -141,6 +149,7 @@ def update_from_gitlab():
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def getPathList():
|
def getPathList():
|
||||||
return ['./' + f for f in listdir('.') if isdir('./' + f) \
|
return ['./' + f for f in listdir('.') if isdir('./' + f) \
|
||||||
and f.lower().startswith('pyren') \
|
and f.lower().startswith('pyren') \
|
||||||
@ -153,6 +162,7 @@ def getLangList():
|
|||||||
# return [f[10:-4] for f in listdir('./Location') if f.lower().startswith('diagoncan_')]
|
# return [f[10:-4] for f in listdir('./Location') if f.lower().startswith('diagoncan_')]
|
||||||
return ['AL', 'CNT', 'CO', 'CR', 'CZ', 'DK', 'EL', 'FI', 'FR', 'GB', 'HG', 'IT', 'JP', 'NG', 'NL', 'PL', 'PO', 'RO', 'RU', 'SD', 'SL', 'SP', 'TR']
|
return ['AL', 'CNT', 'CO', 'CR', 'CZ', 'DK', 'EL', 'FI', 'FR', 'GB', 'HG', 'IT', 'JP', 'NG', 'NL', 'PL', 'PO', 'RO', 'RU', 'SD', 'SL', 'SP', 'TR']
|
||||||
|
|
||||||
|
|
||||||
def getPortList():
|
def getPortList():
|
||||||
ret = []
|
ret = []
|
||||||
if os.name != 'android':
|
if os.name != 'android':
|
||||||
|
4
pyren.sh
4
pyren.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#chmod +x ./venv/bin/activate
|
#chmod +x ./venv/bin/activate
|
||||||
#chmod +x ./_pyren_launcher.py
|
#chmod +x ./_pyren3_launcher.py
|
||||||
## Linux ubuntu fixes uncomment next lines
|
## Linux ubuntu fixes uncomment next lines
|
||||||
#printf "Install new venv ...\n"
|
#printf "Install new venv ...\n"
|
||||||
#Install venv if not present
|
#Install venv if not present
|
||||||
@ -12,6 +12,6 @@
|
|||||||
#./venv/bin/activate
|
#./venv/bin/activate
|
||||||
printf "Runs app ...\n"
|
printf "Runs app ...\n"
|
||||||
#./venv/bin/python ./_pyren_launcher.py
|
#./venv/bin/python ./_pyren_launcher.py
|
||||||
python ./_pyren_launcher.py
|
python3 ./_pyren3_launcher.py
|
||||||
#printf "Deactivate venv ..."
|
#printf "Deactivate venv ..."
|
||||||
#./venv/bin/deactivate
|
#./venv/bin/deactivate
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
import mod_globals
|
import mod_globals
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
#import serial
|
#import serial
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
import serial
|
import serial
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -631,7 +631,7 @@ class DDTLauncher():
|
|||||||
ecu['xml'],
|
ecu['xml'],
|
||||||
ecu['dump'],
|
ecu['dump'],
|
||||||
ecu['ses']]
|
ecu['ses']]
|
||||||
fout.write(str(';'.join(e)).encode("ascii", "ignore") + '\n')
|
fout.write(';'.join(e) + '\n')
|
||||||
fout.close()
|
fout.close()
|
||||||
|
|
||||||
copyfile(filename, "./savedCAR_prev.csv")
|
copyfile(filename, "./savedCAR_prev.csv")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
|
@ -44,16 +44,16 @@ class settings():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
if not os.path.isfile("../settings.p"):
|
if not os.path.isfile("../settings3.p"):
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
f = open('../settings.p', 'rb')
|
f = open('../settings3.p', 'rb')
|
||||||
tmp_dict = pickle.load(f)
|
tmp_dict = pickle.load(f)
|
||||||
f.close()
|
f.close()
|
||||||
self.__dict__.update(tmp_dict)
|
self.__dict__.update(tmp_dict)
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
f = open('../settings.p', 'wb')
|
f = open('../settings3.p', 'wb')
|
||||||
pickle.dump(self.__dict__, f)
|
pickle.dump(self.__dict__, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from xml.dom.minidom import parse
|
from xml.dom.minidom import parse
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
from mod_utils import ChoiceFromDict
|
from mod_utils import ChoiceFromDict
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_service import ecu_mnemolocation
|
from mod_ecu_service import ecu_mnemolocation
|
||||||
from mod_utils import pyren_encode
|
from mod_utils import pyren_encode
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_mnemonic import *
|
from mod_ecu_mnemonic import *
|
||||||
from mod_ecu_screen import *
|
from mod_ecu_screen import *
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_mnemonic import *
|
from mod_ecu_mnemonic import *
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_service import *
|
from mod_ecu_service import *
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_mnemonic import *
|
from mod_ecu_mnemonic import *
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
from xml.dom.minidom import parse
|
from xml.dom.minidom import parse
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
from mod_utils import pyren_encode
|
from mod_utils import pyren_encode
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from mod_ecu_mnemonic import *
|
from mod_ecu_mnemonic import *
|
||||||
from mod_utils import Choice
|
from mod_utils import Choice
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
module contains class for working with ELM327
|
module contains class for working with ELM327
|
||||||
version: 180408
|
version: 180408
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
opt_debug = False
|
opt_debug = False
|
||||||
debug_file = None
|
debug_file = None
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import os
|
import os
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0,"../..")
|
sys.path.insert(0,"../..")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
'''
|
'''
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
|
|
||||||
Version: 180402
|
Version: 180402
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -14,8 +14,8 @@ from mod_utils import pyren_encode
|
|||||||
from mod_utils import KBHit
|
from mod_utils import KBHit
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
|
||||||
def run( elm, ecu, command, data ):
|
|
||||||
|
|
||||||
|
def run(elm, ecu, command, data):
|
||||||
clearScreen()
|
clearScreen()
|
||||||
header = '[' + command.codeMR + '] ' + command.label
|
header = '[' + command.codeMR + '] ' + command.label
|
||||||
|
|
||||||
@ -36,7 +36,6 @@ def run( elm, ecu, command, data ):
|
|||||||
value = pyren_encode(mod_globals.language_dict[id])
|
value = pyren_encode(mod_globals.language_dict[id])
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
DOMTree = xml.dom.minidom.parse(mod_db_manager.get_file_from_clip(data))
|
DOMTree = xml.dom.minidom.parse(mod_db_manager.get_file_from_clip(data))
|
||||||
ScmRoom = DOMTree.documentElement
|
ScmRoom = DOMTree.documentElement
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
'''
|
'''
|
||||||
Scenarium usage example
|
Scenarium usage example
|
||||||
|
|
||||||
|
0
i12comp.exe → tools_and_confs/i12comp.exe
Executable file → Normal file
0
i12comp.exe → tools_and_confs/i12comp.exe
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user