diff --git a/bananaSPLIT/UserInterface/compileUI.py b/bananaSPLIT/UserInterface/compileUI.py new file mode 100644 index 0000000..84f5221 --- /dev/null +++ b/bananaSPLIT/UserInterface/compileUI.py @@ -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 \ No newline at end of file