Skip to content

Commit 51f32f3

Browse files
done v1.1
1 parent b9ec2c6 commit 51f32f3

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

.idea/workspace.xml

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SIM_GUI_exe.zip

-21 KB
Binary file not shown.

__pycache__/main.cpython-36.pyc

-44 Bytes
Binary file not shown.

__pycache__/runSIM.cpython-36.pyc

-3 Bytes
Binary file not shown.

main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class MainWindow(QMainWindow, UI.Ui_MainWindow):
1313
def __init__(self):
1414
super().__init__()
1515
self.setupUi(self)
16+
self.exePath = os.getcwd()
1617

1718
def getExistingDirectory(self):
1819
fileDirectory = QFileDialog.getExistingDirectory(self, "选则文件夹", "/")
@@ -38,16 +39,15 @@ def changeFilesName(self):
3839
def startRunSIM(self):
3940
mode = self.languageComboBox.currentText()
4041
startTime = time.time()
42+
os.chdir(self.filePathEdit.text())
4143

4244
argv = '-p -t ' + self.limitSpinBox.text()
43-
argv = argv + ' -o ' + os.path.join(self.filePathEdit.text(), 'sim_res.txt')
44-
argv = argv + ' ' + os.path.join(self.filePathEdit.text(), '*.*')
45+
argv = argv + ' -o sim_res.txt *.*'
4546
# print(argv)
46-
runSIM.runSIM(mode, argv)
47+
runSIM.runSIM(mode, self.exePath, argv)
4748

48-
argv = '-o ' + os.path.join(self.filePathEdit.text(), 'sim_res_all.txt')
49-
argv = argv + ' ' + os.path.join(self.filePathEdit.text(), '*.*')
50-
runSIM.runSIM(mode, argv)
49+
argv = '-o sim_res_all.txt *.*'
50+
runSIM.runSIM(mode, self.exePath, argv)
5151

5252
endTime = time.time()
5353
self.resultText.setText('查重完成\n结果见sim_res.txt和sim_res_all.txt')

runSIM.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33

44

5-
def runSIM(mode, argv):
6-
nowPath = os.getcwd()
5+
def runSIM(mode, exePath, argv):
6+
nowPath = exePath
77
nowPath = os.path.join(nowPath, 'SIM')
88
fileName = 'sim_' + mode + '.exe'
99
nowPath = os.path.join(nowPath, fileName)

0 commit comments

Comments
 (0)