ricompilate interfacce, verifica script in vscode

This commit is contained in:
2020-10-22 15:10:56 +02:00
parent 24fdaed8d9
commit 8e6abc4e0e
18 changed files with 11554 additions and 11554 deletions

View File

@@ -6,32 +6,32 @@ Created on 24 nov 2019
import os, glob, subprocess
def updateInterfaces():
uifiles = glob.glob("*.ui")
for f in uifiles:
command = r"pyuic5.exe "+f
print(command)
rv = subprocess.run(command, capture_output=True)
if rv.returncode == 0:
fp = open(r".\\CompiledUI\\"+f.replace("ui","py"), 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
else:
print("Command Failure")
uifiles = glob.glob("*.ui")
for f in uifiles:
command = r"pyuic5.exe "+f
print(command)
rv = subprocess.run(command, capture_output=True)
if rv.returncode == 0:
fp = open(r".\\CompiledUI\\"+f.replace("ui","py"), 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
else:
print("Command Failure")
def updateResources():
command = r'pyrcc5.exe '+'.\\resources\\resources.qrc'
print (command)
rv = subprocess.run(command, capture_output=True)
if rv.returncode == 0:
fp = open(r".\\compiledUI\\resources_rc.py", 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
else:
print("Command Failure")
command = r'pyrcc5.exe '+'.\\resources\\resources.qrc'
print (command)
rv = subprocess.run(command, capture_output=True)
if rv.returncode == 0:
fp = open(r".\\compiledUI\\resources_rc.py", 'w')
fp.write(str(rv.stdout, encoding='utf-8').replace('\r', ''))
fp.close()
else:
print("Command Failure")
if __name__ == '__main__':
print(os.getcwd())
os.chdir(r"..\spex\userInterface")
updateInterfaces()
updateResources()
pass
print(os.getcwd())
os.chdir(r"..\spex\userInterface")
updateInterfaces()
updateResources()
pass