File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
IPython/terminal/pt_inputhooks Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,16 @@ def inputhook(context):
5050 except AttributeError : # Only for Qt>=5.14.
5151 pass
5252 _appref = app = QtGui .QApplication ([" " ])
53- _eventloop = QtCore .QEventLoop (app )
5453
5554 # "reclaim" IPython sys.excepthook after event loop starts
5655 # without this, it defaults back to BaseIPythonApplication.excepthook
5756 # and exceptions in the Qt event loop are rendered without traceback
5857 # formatting and look like "bug in IPython".
5958 QtCore .QTimer .singleShot (0 , _reclaim_excepthook )
6059
60+ if _eventloop is None :
61+ _eventloop = QtCore .QEventLoop (app )
62+
6163 if sys .platform == 'win32' :
6264 # The QSocketNotifier method doesn't appear to work on Windows.
6365 # Use polling instead.
You can’t perform that action at this time.
0 commit comments