Advertisement
kalpin

PasswordChecker

Aug 3rd, 2020
1,796
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | None | 0 0
  1. # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  2. from guizero import App, TextBox, PushButton, Text, info
  3. app = App()
  4.  
  5. # Function definitions for your events go here.
  6. def btn_go_clicked():
  7.     if txt_pwd1.value == txt_pwd2.value:
  8.         message = "Passwords match"
  9.     else:
  10.         message = "Passwords do NOT match"
  11.     info("Status",message)
  12.    
  13.  
  14. # Your GUI widgets go here
  15. lbl_password = Text(app, text="Enter password")
  16. txt_pwd1 = TextBox(app,hide_text=True)
  17. lbl_password2 = Text(app, text="Enter password")
  18. txt_pwd2 = TextBox(app,hide_text=True)
  19. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  20.  
  21. # Show the GUI on the screen
  22. app.display()
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement