from guizero import App, TextBox, PushButton, Text, info app = App() def btn_go_clicked(): if txt_password.value == txt_password2.value: info("OK", "passwords are the same") else: info("ERROR", "passwords differ") lbl_password = Text(app, text="Enter password") txt_password = TextBox(app, hide_text=True) lbl_password2 = Text(app, text="Repeat password") txt_password2 = TextBox(app, hide_text=True) btn_go = PushButton(app, command=btn_go_clicked, text="Done") app.display()