##// END OF EJS Templates
Override terminal size in doctests to standardise traceback format...
Override terminal size in doctests to standardise traceback format Should fix test failures on Jenkins

File last commit:

r21934:c0fffd17
r22157:ca5c9233
Show More
qt.py
11 lines | 384 B | text/x-python | PythonLexer
Thomas Kluyver
Write & borrow some inputhooks for prompt_toolkit
r21934 from IPython.external.qt_for_kernel import QtCore, QtGui
def inputhook(context):
app = QtCore.QCoreApplication.instance()
if not app:
return
event_loop = QtCore.QEventLoop(app)
notifier = QtCore.QSocketNotifier(context.fileno(), QtCore.QSocketNotifier.Read)
notifier.setEnabled(True)
notifier.activated.connect(event_loop.exit)
event_loop.exec_()