[Pythonmac-SIG] Intercepting kbd ints
Jack Jansen
jack@oratrix.nl
Tue, 06 Nov 2001 21:39:46 +0100
Recently, Michael Dunn <mdunn@cantares.on.ca> said:
> >How repeatable is the problem?
>
> I just did some experimentation. Pressing cmd-period from any app
> I tried (Eudora, Netscape, Finder!) caused a kbd int! Oddly, when in
> Netscape, all I got was a single-level (outermost) traceback -- no
> kbd int message. Generally, I see a full (eg 2-level) traceback and
> the int msg.
Bingo!
You've just found a bug that is approximately 9 years old and that
apparently has never bothered anyone: MacPythons check-for-interrupt
code does a dirty job (actually, it's the dirty job that Apple
suggested long long ago), it scans through the low-level event queue
looking for Command-period. But, of course, it happily ignores whether
it is in the foreground or the background, so any command-period to
any program will also interrupt MacPython.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm