INNER CODE UNIT · Python
run_in_ipython
pymeasure/pymeasure · pymeasure/display/__init__.py:36
def run_in_ipython(app):
""" Attempts to run the QApplication in the IPython main loop, which
requires the command "%gui qt" to be run prior to the script execution.
On failure the Qt main loop is initialized instead
"""
try:
from IPython.lib.guisupport import start_event_loop_qt4
except ImportError:
app.exec_()
else:
start_event_loop_qt4(app)