title: tkinter: KeyboardInterrupt taking a while
body: <p>Using Tkinter with Python on Linux, I'm trying to make Ctrl+C stop execution by using the <code>KeyboardInterrupt</code> Exception, but when I press it nothing happens for a while. Eventually it &quot;takes&quot; and exits.  Example program:</p>
  <pre><code>import sys
  from Tkinter import *
  
  try: 
      root = Tk()
      root.mainloop()
  except:
      print(&quot;you pressed control c&quot;)
      sys.exit(0)
  </code></pre>
  <p>How can the program react quicker?</p>