[IPython-dev] Ctrl-C quitting ipython
Fernando Perez
fperez.net at gmail.com
Thu Nov 4 02:17:50 EDT 2010
On Wed, Nov 3, 2010 at 12:01 PM, Robert Kern <robert.kern at gmail.com> wrote:
>
> You can get any Python-installed handler using signal.getsignal(signal.SIGINT).
> I don't know if you can determine C-installed handlers. Would you mind reverting
No, you can't, unfortunately:
http://svn.python.org/view/python/branches/release27-maint/Modules/signalmodule.c?revision=85145&view=markup
if you scroll down to getsignal, you'll see that it just reads from a
global table it keeps, which is filled by signal(). A C-installed
handler can call the raw PyOS_setsig() without updating the table, and
getsignal() will be none the wiser.
Cheers,
f
More information about the IPython-dev
mailing list