title: How to pause Python while Tkinter window is open?
body: <p>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:</p>
  
  <pre><code>keep_going = False
  KeepGoingPrompt(keep_going)
  if not keep_going:
      return</code></pre>
  
  <p>The prompt sets <code>keep_going</code> to <code>True</code> or leaves it <code>False</code>.
  Problem is, the code seems to continue while <code>KeepGoingPrompt</code> is open. I tried storing a reference to the <code>prompt</code> and adding a loop like</p>
  
  <pre><code>while prompt:
      time.sleep(1)
  </code></pre>
  
  <p>but python gets stuck in the loop and freezes. 
  Is there a better way to do it?</p>
  
  <p>Thanks</p>