Aggiunto tool per la compilazione delle interfacce
This commit is contained in:
17
bananaSPLIT/UserInterface/compileUI.py
Normal file
17
bananaSPLIT/UserInterface/compileUI.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
'''
|
||||||
|
Created on 24 nov 2019
|
||||||
|
|
||||||
|
@author: Emanuele Trabattoni
|
||||||
|
'''
|
||||||
|
import os, glob, subprocess
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print(os.getcwd())
|
||||||
|
uifiles = glob.glob("*.ui")
|
||||||
|
for f in uifiles:
|
||||||
|
command = r"C:\Program Files\Python37\Scripts\pyuic5.exe "+f
|
||||||
|
rv = subprocess.run(command, capture_output=True)
|
||||||
|
fp = open(f.replace("ui","py"), 'w')
|
||||||
|
fp.write(str(rv.stdout, encoding='ascii').replace('\n\r', '\n'))
|
||||||
|
fp.close()
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user