event-driven

Is tkwait wait_variable/wait_window/wait_visibility broken?

Is tkwait wait_variable/wait_window/wait_visibility broken? Question: I recently started to use tkwait casually and noticed that some functionality only works under special conditions. For example: import tkinter as tk def w(seconds): dummy = tk.Toplevel(root) dummy.title(seconds) dummy.after(seconds*1000, lambda x=dummy: x.destroy()) dummy.wait_window(dummy) print(seconds) root = tk.Tk() for i in [5,2,10]: w(i) root.mainloop() The code above works just fine …

Total answers: 1