def btn_loadscript_click(self):
#self.scriptPath= self.entry_scriptPath.get()
tmpPath= self.entry_scriptPath.get()
if utils_tool.check_file(tmpPath):
#self.txtbox_script.delete('1.0', END)
self.txtbox_script.clear()
self.txtbox_script.importfile(tmpPath)
self.txtbox_script.configure(label_text= "- "+ tmpPath.split("/")[-1]+" -")
else:
tkMessageBox.showerror("Error", "'%s' dost not exist !" % tmpPath)
'''
cmd_file = open(self.scriptPath, "r")
lines = cmd_file.readlines()
for line in lines:
cmd = line.strip()
if len(cmd)>0:
self.txtbox_script.insert(END, cmd+'\n')
cmd_file.close()
'''
评论列表
文章目录