Message92580
> 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. |
|
Date |
User |
Action |
Args |
2009-09-13 18:36:00 | bernie | set | recipients:
+ bernie, benjamin.peterson |
2009-09-13 18:36:00 | bernie | set | messageid: <1252866960.0.0.799286665465.issue6901@psf.upfronthosting.co.za> |
2009-09-13 18:35:58 | bernie | link | issue6901 messages |
2009-09-13 18:35:57 | bernie | create | |
|