I have a GUI with two buttons. When The GUI is started, I want python to print "No button selected" in 30 minutes if no button is selected in 30 minutes. Tips?
Create a variable that is initially set to
False
.
Use tkinter's
after
to bind an event to happen after 30 minutes.
If one of the buttons are clicked, event handler changes the variable to
True
.
When the 30 minutes is up the event will be called in which the variables
True
/
False
state and output accordingly.
See the following thread for examples of using tkinter's
after
https://python-forum.io/Thread-Tkinter-H...ng-the-gui