1
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import os, shutil, random, easygui, time
|
import os, easygui, time
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
from subprocess import *
|
from subprocess import *
|
||||||
slash = '\\'
|
slash = '\\'
|
||||||
@@ -9,16 +9,14 @@ if start == "Cancel":
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
if start == "Browse file":
|
if start == "Browse file":
|
||||||
thisFile = easygui.fileopenbox(filetypes=["ui"])
|
thisFile = easygui.fileopenbox(filetypes=["*.ui"])
|
||||||
|
|
||||||
filename = basename(thisFile)[:-3]
|
filename = basename(thisFile)[:-3]
|
||||||
|
|
||||||
fileik = open('convert.txt', "w+")
|
fileik = open('convert.bat', "w+")
|
||||||
fileik.write('python -m PyQt5.uic.pyuic -x ' + thisFile + " -o " + os.path.dirname(thisFile) + slash + filename + ".py")
|
fileik.write('python -m PyQt5.uic.pyuic -x ' + thisFile + " -o " + os.path.dirname(thisFile) + slash + filename + ".py")
|
||||||
fileik.close()
|
fileik.close()
|
||||||
|
|
||||||
shutil.move("convert.txt", "convert.bat")
|
|
||||||
|
|
||||||
call('start convert.bat', shell=True)
|
call('start convert.bat', shell=True)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user