Hi all -- I've just started playing with wxWindows this weekend. I like
what I see so far, but one thing bugs me: when I run a wxPython app from
an xterm (as all good Unix geeks do), hitting Ctrl-C in the terminal
does not terminate the program. 99% of X Window applications happily
die when they receive SIGINT, so why does this not work for wxPython
apps? wxPython's handling of SIGINT (aka KeyboardInterrupt) is
particulary weird in that when the wx main loop finally decides it's
time to quit (eg. I close the window), *then* I get a KeyboardInterrupt
traceback on stderr. Odd.
For the record, I'm running Debian "unstable" with wxWindows and
wxPython 2.4.0.3, under Python 2.2.2 -- all from Debian packages.
Hi all -- I've just started playing with wxWindows this weekend. I like
what I see so far, but one thing bugs me: when I run a wxPython app from
an xterm (as all good Unix geeks do), hitting Ctrl-C in the terminal
does not terminate the program. 99% of X Window applications happily
die when they receive SIGINT, so why does this not work for wxPython
apps? wxPython's handling of SIGINT (aka KeyboardInterrupt) is
particulary weird in that when the wx main loop finally decides it's
time to quit (eg. I close the window), *then* I get a KeyboardInterrupt
traceback on stderr. Odd.
I've wondered about this myself a few times but have never taken the time to look further into it. It may only take setting a signal handler for SIGINT that calls wxGetApp().ExitMainLoop(). If you want to play with it I'll gladly look at patches.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!