maroph

check_password.py

Dec 6th, 2019
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. from guizero import App, TextBox, PushButton, Text, info
  2. app = App()
  3.  
  4. def btn_go_clicked():
  5.     if txt_password.value == txt_password2.value:
  6.         info("OK", "passwords are the same")
  7.     else:
  8.         info("ERROR", "passwords differ")
  9.  
  10.  
  11. lbl_password = Text(app, text="Enter password")
  12. txt_password = TextBox(app, hide_text=True)
  13.  
  14. lbl_password2 = Text(app, text="Repeat password")
  15. txt_password2 = TextBox(app, hide_text=True)
  16.  
  17. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  18.  
  19. app.display()
Advertisement
Add Comment
Please, Sign In to add comment