From b0cfb91c2325417edb3503015e94b1d58acacf1c Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Fri, 7 May 2021 22:01:57 +0300 Subject: [PATCH] 1 --- OfficialProjects/PyQt converter/PyQt converter.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/OfficialProjects/PyQt converter/PyQt converter.py b/OfficialProjects/PyQt converter/PyQt converter.py index 0c8df12..f34406f 100644 --- a/OfficialProjects/PyQt converter/PyQt converter.py +++ b/OfficialProjects/PyQt converter/PyQt converter.py @@ -1,4 +1,4 @@ -import os, shutil, random, easygui, time +import os, easygui, time from os.path import basename from subprocess import * slash = '\\' @@ -9,16 +9,14 @@ if start == "Cancel": exit() if start == "Browse file": - thisFile = easygui.fileopenbox(filetypes=["ui"]) + thisFile = easygui.fileopenbox(filetypes=["*.ui"]) 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.close() -shutil.move("convert.txt", "convert.bat") - call('start convert.bat', shell=True) time.sleep(1)