GUI.py 文件源码

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

项目:bemoss_gui2.1 作者: bemoss 项目源码 文件源码
def __init__(self):

        self.passwd = None
        self.do_update = False

        # current working directory
        self.cwd = os.getcwd()
        self.bemoss_dir = self.cwd.replace('bemoss_gui', 'bemoss_os/')

        img_path = self.find_img()
        self.logo = ImageTk.PhotoImage(Image.open(img_path).resize((350,125)))
        self.img = ttk.Label(root, image=self.logo, justify='center')
        self.img.pack(fill=Tkinter.Y, expand=True, padx=5, pady=30)
        # logoimage

        self.ip_addr = self.getIPs()
        self.ipframe = Tkinter.LabelFrame(root, text='Your IP address:')
        self.ip_label = Tkinter.Label(self.ipframe, text=self.ip_addr, font=('Courier', 12, 'bold'))
        self.ip_label.pack()
        self.ipframe.pack(fill=Tkinter.X, expand=True, padx=15)
        # IP

        self.button_quit = ttk.Button(root, text='Run BEMOSS', command=self.run_software)
        self.button_quit.pack(side=Tkinter.LEFT, fill=Tkinter.BOTH, expand=True, pady=15, padx=10)
        self.button_runNode = ttk.Button(root, text='Run BEMOSS Node', command=self.run_software_asnode)
        self.button_runNode.pack(side=Tkinter.LEFT, fill=Tkinter.BOTH, expand=True, pady=15, padx=10)
        self.button_run = ttk.Button(root, text='Stop BEMOSS', command=self.stop_software)
        self.button_run.pack(side=Tkinter.LEFT, fill=Tkinter.BOTH, expand=True, pady=15, padx=10)
        self.button_adv = ttk.Button(root, text='Advanced Setting', command=self.adv_set)
        self.button_adv.pack(side=Tkinter.LEFT, fill=Tkinter.BOTH, expand=True, pady=15, padx=10)


        # buttons
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号