[Python-ideas] IDEA: do not alter default SIGINT handling

ryles rylesny at gmail.com
Tue Sep 15 06:04:20 CEST 2009

On Sep 14, 8:13 pm, Greg Ewing <greg.ew... at canterbury.ac.nz> wrote:
> Nick Coghlan wrote:
> > time.sleep() is actually a great example. Firstly, I didn't use it just
> > yesterday precisely because dropping it in in a naive fashion would have
> > broken Ctrl-C handling
> What do you mean? Ctrl-C interrupts time.sleep()
> okay in my Python (on MacOSX).

It's OS-dependent, apparently. Ctrl-C interrupts for me too on Linux
or in Cygwin, but it doesn't work on Windows XP. I sometimes replace
sleep() with my own implementation that does small time.sleep()'s in a
loop so that it can be interrupted.

More information about the Python-ideas mailing list