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:
ShrLnm 2022-08-27 05:14:57 +00:00
commit 5131ca9a41
48 changed files with 135 additions and 123 deletions

6
.gitignore vendored
View File

@ -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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
icons/splash_pyren3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

12
main.py
View File

@ -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':

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys, os
import mod_globals

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys, os
#import serial

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys, os
import serial

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import re

View File

@ -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")

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gc

View File

@ -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()

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from xml.dom.minidom import parse
import xml.dom.minidom

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_utils import Choice
from mod_utils import ChoiceFromDict

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_ecu_mnemonic import *
from mod_ecu_screen import *

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_ecu_mnemonic import *
from mod_utils import Choice

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_ecu_service import *

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_ecu_mnemonic import *
from mod_utils import Choice

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import re

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_utils import Choice
from xml.dom.minidom import parse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_utils import Choice
from mod_utils import pyren_encode

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from mod_ecu_mnemonic import *
from mod_utils import Choice

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
module contains class for working with ELM327
version: 180408

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
opt_debug = False
debug_file = None

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import csv
import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
sys.path.insert(0,"../..")

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
This program is free software: you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Version: 180402

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Scenarium usage example

View File

@ -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
View File