bob at eleaston.com
Sat Sep 7 12:32:24 CEST 2002
Yes Peter, it makes sense that PythonWin works that way by design. You are
also right about running from the command prompt after development/debug is
For this particular program, using a file semaphore is ideal since I can
place it at the right point in the program to enable easy restart, something
not easily done with the random ctrl-break.
Thanks to all who helped clear the fog for me.
"Peter Hansen" <peter at engcorp.com> wrote in message
news:3d796d22 at news.sentex.net...
> Bob Easton wrote:
> > Using catchCtlC.py in a command line environment works as you expect.
> > hit Ctrl-Break, Windows displays "^C" and then a command prompt. If I
> > Ctrl-C, the exception handler catches it and displays the results as
> > specified in catchCtlC/py
> > However, my preferred execution environment is PythonWin, not a command
> > prompt. There, neither Ctrl-break, not Ctrl-C have any effect. That
> > easily be a bug with PythonWin.
> Not a bug, I think. The whole Ctrl-C/Ctrl-Break concept is only
> meaningful for command-line ("console") programs, not GUI apps.
> I don't use PythonWin, but my guess is it does not bother passing
> ctrl-c on to the application, possibly by design.
> Can't you just run it under the console? What advantages do
> you find by running it under PythonWin other than during
> Also, have you looked at the msvcrt module and kbhit() ?
More information about the Python-list