У меня есть проблема с кодом на Python, я не знаю, что делать ? пожалуйста, помогите мне
проблема кода me заключается в том, что кнопка не работает над этим кодом
Что я уже пробовал:
<pre>from tkinter import * import tkinter.messagebox as tkMessageBox import mysql.connector root = Tk() root.title("login software") # ================= Setting up the Main Frame ================= width = 640 height = 480 screen_width = root.winfo_screenwidth() screen_height = root.winfo_screenheight() x = (screen_width/2) - (width/2) y = (screen_height/2) - (height/2) root.geometry("%dx%d+%d+%d" % (width, height, x, y)) root.resizable(0, 0) # ================= Designing the Layout ===================== Top = Frame(root, bd=2, relief=RIDGE) Top.pack(side=TOP, fill=X) Form = Frame(root, height=200) Form.pack(side=TOP, pady=20) #==============================VARIABLES====================================== USERNAME = StringVar() PASSWORD = StringVar() # ================= Designing the Layout ================= lbl_title = Label(Top, text = "Python: Simple Login Application", font=('arial', 15)).pack(fill=X) lbl_username = Label(Form, text = "Username:", font=('arial', 14), bd=15).grid(row=0, sticky="e") lbl_password = Label(Form, text = "Password:", font=('arial', 14), bd=15).grid(row=1, sticky="e") lbl_text = Label(Form).grid(row=2, columnspan=2) username = Entry(Form, textvariable=USERNAME, font=(14)).grid(row=0, column=1) password = Entry(Form, textvariable=PASSWORD, show="*",font=(14)).grid(row=1, column=1) b = Button(Form, text="OK", command= login ).pack() #========================================INITIALIZATION=================================== root.mainloop()