jshackles / idle_master_py

The Python version of Idle Master
GNU General Public License v2.0
230 stars 71 forks source link

Don't treat KeyboardInterrupt as errors #9

Open ghost opened 9 years ago

ghost commented 9 years ago

This makes it possibly to exit Idle Master by using Ctrl+C on the terminal it is run from. Previously, you would need to hit Ctrl+C about five times to actually get Idle Master to exit.

See http://effbot.org/zone/stupid-exceptions-keyboardinterrupt.htm for reference.

ghost commented 8 years ago

This doesn't remove the fake window.

^CTraceback (most recent call last):
  File "start.py", line 261, in <module>
    time.sleep(delay)
KeyboardInterrupt

After this the window still exists. If i then focus on the window the window closes with this message:

$ Traceback (most recent call last):
  File "steam-idle.py", line 74, in <module>
    gui.mainloop()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1128, in mainloop
    self.tk.mainloop(n)
ghost commented 8 years ago

Interesting. I'm not using the GUI window anymore (see PR #7), so I didn't notice this.

ghost commented 8 years ago

Thank you, I will try that out.