I'm writing a program that sometimes encounters an error. When it does, it pops up a Tkinter dialog asking the user whether to continue. It's a more complicated version of this:
keep_going = False
KeepGoingPrompt(keep_going)
if not keep_going:
return
The prompt sets keep_going
to True
or leaves it False
.
Problem is, the code seems to continue while KeepGoingPrompt
is open. I tried storing a reference to the prompt
and adding a loop like
while prompt:
time.sleep(1)
but python gets stuck in the loop and freezes. Is there a better way to do it?
Thanks