Aggiunto tool per la compilazione delle interfacce

This commit is contained in:
2019-11-24 18:32:59 +01:00
parent 59f3e2d6b3
commit 2a0695f78c

View 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