[IPython-dev] make ctrl-c stop causing a crash exit with %gui and PyQt5
Erik Hvatum
ice.rikh at gmail.com
Fri May 8 18:17:32 EDT 2015
Patch attached. I think I'm fixing a straightforward oversight;
create_inputhook_qt4 wants a an InputHookManager object as its first
argument, not an InputHookBase. However, we get away with supplying the
wrong object until someone hits ctrl-c. Passing the right object makes
graceful ctrl-c event loop integration work properly, rather than causing
IPython to exit.
This seems familiar, but I'm not finding anything when I search. Apologies
if this issue is old news :)
Cheers,
Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150508/b3a840f3/attachment.html>
-------------- next part --------------
diff --git a/IPython/lib/inputhook.py b/IPython/lib/inputhook.py
index baeed8f..4ae2cb3 100644
--- a/IPython/lib/inputhook.py
+++ b/IPython/lib/inputhook.py
@@ -363,7 +363,7 @@ def enable(self, app=None):
app = QtGui.QApplication(sys.argv)
"""
from IPython.lib.inputhookqt4 import create_inputhook_qt4
- app, inputhook_qt4 = create_inputhook_qt4(self, app)
+ app, inputhook_qt4 = create_inputhook_qt4(self.manager, app)
self.manager.set_inputhook(inputhook_qt4)
if _use_appnope():
from appnope import nope
More information about the IPython-dev
mailing list