ipython: Ctrl-C not working when GUI/pylab integration is active

As @juliantaylor mentioned in #825, it seems that recently Ctrl-C stopped working. To see it, open a normal ipython; first verify that you can interrupt a normal operation:

In [1]: import time; time.sleep(3)
^C---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
/home/fperez/tmp/src/scipy/<ipython-input-1-8d480fb9ac1e> in <module>()
----> 1 import time; time.sleep(3)

KeyboardInterrupt: 

Then turn GUI support on and try again:

In [2]: gui qt
Out[2]: <PyQt4.QtGui.QApplication at 0x2b84f80>

In [3]: import time; time.sleep(3)
^C^C^C
In [4]: 

Above, I hit ^C three times and nothing happened, the time.sleep(3) ran to completion without the interrupt working.

This is new and a major issue we do need to resolve before releasing 0.12.

About this issue

  • Original URL
  • State: closed
  • Created 13 years ago
  • Comments: 23 (16 by maintainers)

Commits related to this issue

Most upvoted comments

It seems that this error is back. Using ipython 3, matplotlib 1.4, qt 4.8.6 i get this if I use %matplotlib qt and doing a keyboard interrupt:

 Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/home/maxnoe/.local/anaconda3/lib/python3.4/site-packages/IPython/lib/inputhookqt4.py", line 90, in inputhook_qt4
    try:
KeyboardInterrupt

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True