关键字筛选题号功能在每次编译后会留下日期时间和题号列表
This commit is contained in:
parent
77068d9df8
commit
85ce9ae92c
|
|
@ -1,6 +1,7 @@
|
|||
from PySide6.QtWidgets import QWidget, QApplication, QLineEdit
|
||||
from Ui_题号筛选器 import Ui_Form
|
||||
from database_tools import *
|
||||
import time,os
|
||||
|
||||
class MyWindow(QWidget,Ui_Form):
|
||||
def __init__(self):
|
||||
|
|
@ -56,7 +57,10 @@ class MyWindow(QWidget,Ui_Form):
|
|||
|
||||
def build(self):
|
||||
exp = generate_exp(self.matchlist)
|
||||
SaveTextFile(exp,"临时文件/题号筛选.txt")
|
||||
try:
|
||||
AppendTextFile(f"\n{time.ctime()}\n{exp}\n","临时文件/题号筛选.txt")
|
||||
except:
|
||||
SaveTextFile(f"{time.ctime()}\n{exp}\n","临时文件/题号筛选.txt")
|
||||
prodictpath = "../题库0.3/problems.json"
|
||||
objdictpath = "../题库0.3/lessonobj.json"
|
||||
raw_pro_dict = load_dict(prodictpath)
|
||||
|
|
@ -133,6 +137,9 @@ class MyWindow(QWidget,Ui_Form):
|
|||
|
||||
endtime = time.time()
|
||||
print(f"生成pdf文件所花时间: {endtime-midtime:.3f}秒")
|
||||
os.system("code 临时文件/题号筛选.txt")
|
||||
os.startfile("临时文件")
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Reference in New Issue