Tkinter简单使用用户登陆-前端
1.Tkinter官方文档: https://docs.python.org/3/library/tkinter.html?highlight=tkinter#module-tkinter 2.新建HelloTK.py,把网站的A Simple Hello World Program下的代码粘过来,先运行下; import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) self.master = master self.pack() self.create_widgets() def create_widgets(self): self.hi_there = tk.Button(self) self.hi_there["text"] = "Hello World\n(click me)" self.hi_there["command"] = self.say_hi self.hi_there.pack(side="top") self.quit = tk.Button(self, text="QUIT", fg="red", command=self.master.destroy) self.quit.pack(side=