Control-C alternative in Windows

Vlad Dogaru ddvlad at gmail.com
Sun Dec 17 04:57:22 EST 2006


Hello,

I've written a simple, standalone wiki server in Python. It runs a
BaseHTTPServer's serve_forever() method until a KeyboardInterrupt is
caught, at which point it writes changes to a file and exits. This
works as expected in Linux. However, in Windows I cannot stop the
script with Control-C. I've only been able to stop it with Ctrl-Break,
which does not send KeyboardInterrupt. This means no saving to the file
and effectively a useless script. Any ideas as to how I might make this
work in Windows?

Thanks in advance,
Vlad




More information about the Python-list mailing list