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/
|
||||
/.DS_Store
|
||||
/EcuDacia/
|
||||
/EcuRsm/
|
||||
/Output/
|
||||
@ -22,6 +21,9 @@ MTCSAVE/
|
||||
NML/
|
||||
Params/
|
||||
Python27/
|
||||
/build/
|
||||
/.intino/
|
||||
/venv/
|
||||
*.pyc
|
||||
*.p
|
||||
*.zip
|
||||
@ -29,9 +31,9 @@ Python27/
|
||||
*.acf
|
||||
*.tdv
|
||||
*.bin
|
||||
*.DS_Store
|
||||
pyren3/history.txt
|
||||
pyren3/parser.out
|
||||
pyren3/parsetab.py
|
||||
pyren3/scen_appr_4valves.py
|
||||
pyren3/scen_ecri_fap2.py
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
@echo off
|
||||
echo Run's app ...
|
||||
python27\python.exe _pyren_launcher.py
|
||||
rem uses python3
|
||||
python3.exe _pyren3_launcher.py
|
||||
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 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, "serial"))
|
||||
|
||||
|
||||
if osname == 'nt':
|
||||
import pip
|
||||
|
||||
@ -81,6 +88,7 @@ if osname == 'android':
|
||||
print("Error while using jnius")
|
||||
sys.exit()
|
||||
|
||||
|
||||
def update_from_gitlab():
|
||||
try:
|
||||
import os
|
||||
@ -141,6 +149,7 @@ def update_from_gitlab():
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def getPathList():
|
||||
return ['./' + f for f in listdir('.') if isdir('./' + f) \
|
||||
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 ['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():
|
||||
ret = []
|
||||
if os.name != 'android':
|
||||
|
4
pyren.sh
4
pyren.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#chmod +x ./venv/bin/activate
|
||||
#chmod +x ./_pyren_launcher.py
|
||||
#chmod +x ./_pyren3_launcher.py
|
||||
## Linux ubuntu fixes uncomment next lines
|
||||
#printf "Install new venv ...\n"
|
||||
#Install venv if not present
|
||||
@ -12,6 +12,6 @@
|
||||
#./venv/bin/activate
|
||||
printf "Runs app ...\n"
|
||||
#./venv/bin/python ./_pyren_launcher.py
|
||||
python ./_pyren_launcher.py
|
||||
python3 ./_pyren3_launcher.py
|
||||
#printf "Deactivate venv ..."
|
||||
#./venv/bin/deactivate
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os
|
||||
import mod_globals
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os
|
||||
#import serial
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os
|
||||
import serial
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -631,7 +631,7 @@ class DDTLauncher():
|
||||
ecu['xml'],
|
||||
ecu['dump'],
|
||||
ecu['ses']]
|
||||
fout.write(str(';'.join(e)).encode("ascii", "ignore") + '\n')
|
||||
fout.write(';'.join(e) + '\n')
|
||||
fout.close()
|
||||
|
||||
copyfile(filename, "./savedCAR_prev.csv")
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys, os
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import gc
|
||||
|
@ -44,16 +44,16 @@ class settings():
|
||||
pass
|
||||
|
||||
def load(self):
|
||||
if not os.path.isfile("../settings.p"):
|
||||
if not os.path.isfile("../settings3.p"):
|
||||
self.save()
|
||||
|
||||
f = open('../settings.p', 'rb')
|
||||
f = open('../settings3.p', 'rb')
|
||||
tmp_dict = pickle.load(f)
|
||||
f.close()
|
||||
self.__dict__.update(tmp_dict)
|
||||
|
||||
def save(self):
|
||||
f = open('../settings.p', 'wb')
|
||||
f = open('../settings3.p', 'wb')
|
||||
pickle.dump(self.__dict__, f)
|
||||
f.close()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
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 ChoiceFromDict
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_ecu_service import ecu_mnemolocation
|
||||
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_screen import *
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_ecu_mnemonic import *
|
||||
from mod_utils import Choice
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_ecu_service import *
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_ecu_mnemonic import *
|
||||
from mod_utils import Choice
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_utils import Choice
|
||||
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 pyren_encode
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from mod_ecu_mnemonic import *
|
||||
from mod_utils import Choice
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
module contains class for working with ELM327
|
||||
version: 180408
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
opt_debug = False
|
||||
debug_file = None
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import csv
|
||||
import os
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
|
||||
Version: 180402
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
@ -14,8 +14,8 @@ from mod_utils import pyren_encode
|
||||
from mod_utils import KBHit
|
||||
import xml.dom.minidom
|
||||
|
||||
def run( elm, ecu, command, data ):
|
||||
|
||||
def run(elm, ecu, command, data):
|
||||
clearScreen()
|
||||
header = '[' + command.codeMR + '] ' + command.label
|
||||
|
||||
@ -36,7 +36,6 @@ def run( elm, ecu, command, data ):
|
||||
value = pyren_encode(mod_globals.language_dict[id])
|
||||
return value
|
||||
|
||||
|
||||
DOMTree = xml.dom.minidom.parse(mod_db_manager.get_file_from_clip(data))
|
||||
ScmRoom = DOMTree.documentElement
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
Scenarium usage example
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
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