def startCheck(self): dc = self.dc if setting_fftool.has_query: utils.showinfo("有任务正在执行,请稍后") return vlstr = self.varL.get() vrstr = self.varR.get() vlarr = utils.var_to_list_smb(vlstr) vrarr = utils.var_to_list_smb(vrstr) if utils.var_is_empty(vlstr): utils.showinfo("还没有导入文件") return # # 禁用开始按钮 self.clearQuery() self.lockBtn(True) # p5 = self.outTxt['text'] p5 = self.fc_out.get_text() fast_mode_select = True if self.CheckVar1.get() else False dc["output_dir"] = p5 dc["list1"] = vlarr dc["list2"] = vrarr dc["fast_mode_select"] = fast_mode_select # 记忆操作 setdc = setting_fftool.read_setting() setdc["output_dir"] = p5 setting_fftool.save_setting(setdc) # 禁用开始按钮 self.clearQuery() self.lockBtn(True) # 执行操作 import threading self.t1 = threading.Thread(target=self.processConcat, args=(dc, '')) self.t1.setDaemon(True) self.t1.start()
def update_query(self, query_str, warning=False): # self.logTxt['fg'] = "#ff5643" if warning else "#0096FF" # self.logTxt['text'] = qStr tup = tuple([query_str]) v_str = self.start.get_string_var() if utils.var_is_empty(v_str): new_tup = tup else: v = utils.var_to_list(v_str) if len(v): new_tup = utils.append_tup(tuple(v), tup) else: new_tup = tup new_arr = list(new_tup) final_arr = [] for item in new_arr: if item: final_arr.append(item) tup = tuple(final_arr) self.start.set_string_var(tup)
def updateQuery(self, qStr, warning=False): # self.logTxt['fg'] = "#ff5643" if warning else "#0096FF" # self.logTxt['text'] = qStr tup = tuple([qStr]) vStr = self.start_btn.get_string_var() if utils.var_is_empty(vStr): ntup = tup else: v = utils.var_to_list(vStr) if len(v): ntup = utils.append_tup(tuple(v), tup) else: ntup = tup nArr = list(ntup) nnArr = [] for item in nArr: if item: nnArr.append(item) tup = tuple(nnArr) self.start_btn.set_string_var(tup)
def update_query(self, q_str, warning=False): q_str = utils.get_hms() + " " + q_str utils.set_title(q_str) if warning: "" # self.logTxt['fg'] = "#ff5643" if warning else "#0096FF" # self.logTxt['text'] = qStr tup = tuple([q_str]) var_str = self.get_string_var() if utils.var_is_empty(var_str): new_tup = tup else: v = utils.var_to_list(var_str) if len(v): new_tup = utils.append_tup(tuple(v), tup) else: new_tup = tup new_arr = list(new_tup) tmp_arr = [] for item in new_arr: if item: tmp_arr.append(item) tup = tuple(tmp_arr) self.set_string_var(tup)