BUG: Ctrl+C crashes wx pylab kernel in qtconsole. #1573

Merged
merged 1 commit into from Apr 13, 2012

5 participants

@pankajp

Wx import sets the SIGINT handler to 0 so we reset it to python's
default_int_handler to handle Ctrl+C.
The following thread discusses the issue:
http://mail.scipy.org/pipermail/ipython-dev/2012-April/008942.html

@pankajp pankajp BUG: Ctrl+C crashes wx pylab kernel in qtconsole.
Wx import sets the SIGINT handler to 0 so we reset it to python's
default_int_handler to handle Ctrl+C.
The following thread discusses the issue:
http://mail.scipy.org/pipermail/ipython-dev/2012-April/008942.html
76a9b91
@jdmarch

Fixes #1574

@prabhuramachandran

@ellisonbg, @fperez, @epatters -- this fixes a pretty serious bug with the qtconsole: try this:

  ipython-qtconsole --pylab=wx

Create an infinite loop and hit Ctrl-C and the prompt is lost. It would be great if this were merged ASAP, on the mac Mayavi only works on wxPython so this can be bad for someone wanting that.

@takluyver
IPython member

I know very little about the event loop integration, but does the same fix need to be in the 'inputhook' system for integration with plain terminal IPython? If someone could check if the same bug affects that, that would be great.

I think this is the relevant file: https://github.com/ipython/ipython/blob/master/IPython/lib/inputhookwx.py

@prabhuramachandran

Yes, the inputhook already sets the signal handler correctly and in fact that was where this solution was copied over from. :) So this problem does not occur on the terminal client but only on the qtconsole.

@takluyver
IPython member

Oh yes, I see that code now. No other objections.

@fperez
IPython member

Looks good to me too; @jdmarch merge away!

@jdmarch jdmarch merged commit ca084e3 into ipython:master Apr 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment