Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- usernameEntry = tk.Entry(self)
- passwordEntry = tk.Entry(self, show="*")
- usernameLabel = tk.Label(self, text="Username").pack()
- usernameEntry.pack()
- pas1swordLabel = tk.Label(self, text="Password").pack()
- passwordEntry.pack()
- def login_btn_clicked():
- #print("Clicked")
- username = usernameEntry.get()
- password = passwordEntry.get()
- if username == "leeman" and password == "password":
- print("Done Auth")
- controller.show_frame(menu)
- elif self.failedLogins >= 3:
- messagebox.showerror("Login failed", "Too many incorrect login attempts")
- else:
- self.failedLogins+=1
- button = tk.Button(self, text="Login", command=login_btn_clicked)
- button.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement