This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bernie
Recipients benjamin.peterson, bernie
Date 2009-09-13.18:35:57
SpamBayes Score 2.568426e-06
Marked as misclassified No
Message-id <1252866960.0.0.799286665465.issue6901@psf.upfronthosting.co.za>
In-reply-to
Content
> This is a fundemental behavior that will never change. If you
> dislike it, you can remove the signal handler for it with the
> signal module.

What?  We could break the syntax of "print" statements and
cannot change this minor detail that afftects many 1% of all
Python programs?

As a matter of fact, for 2 years I've been using this in my
/usr/lib64/python2.6/sitecustomize.py:

----cut-----
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
----cut-----

^C has been working perfectly ever since.  So far, I have not
yet found a single Python program where restoring the default
behavior of SIGINT causes real issues, but there may certainly
be a few.

Granted, this is just a kludge, not a perfect fix, but from a
user perspective, it already improves upon the current behavior
(i.e. more pros than cons).

At least, this is my personal experience.  If you're skeptical,
please try this workaround yourself for a few months and let me
know what breaks for you.
History
Date User Action Args
2009-09-13 18:36:00berniesetrecipients: + bernie, benjamin.peterson
2009-09-13 18:36:00berniesetmessageid: <1252866960.0.0.799286665465.issue6901@psf.upfronthosting.co.za>
2009-09-13 18:35:58bernielinkissue6901 messages
2009-09-13 18:35:57berniecreate