gui_main.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Farmbot_GeneralAP 作者: SpongeYao 项目源码 文件源码
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()
        '''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号