diff options
| author | smosker <[email protected]> | 2022-02-10 16:48:22 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:22 +0300 |
| commit | 01fa2667d0e5e868b18424bc1906146e5ee340db (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /contrib/python/ipython/py2/IPython/lib/guisupport.py | |
| parent | dd14d17a747a9c259858faf2fcc3ea6b92df4e15 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/lib/guisupport.py')
| -rw-r--r-- | contrib/python/ipython/py2/IPython/lib/guisupport.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/python/ipython/py2/IPython/lib/guisupport.py b/contrib/python/ipython/py2/IPython/lib/guisupport.py index b2cc89b57ca..5e13d4343c6 100644 --- a/contrib/python/ipython/py2/IPython/lib/guisupport.py +++ b/contrib/python/ipython/py2/IPython/lib/guisupport.py @@ -57,10 +57,10 @@ so you don't have to depend on IPython. """ -# Copyright (c) IPython Development Team. -# Distributed under the terms of the Modified BSD License. +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. -from IPython.core.getipython import get_ipython +from IPython.core.getipython import get_ipython #----------------------------------------------------------------------------- # wx @@ -78,15 +78,15 @@ def get_app_wx(*args, **kwargs): def is_event_loop_running_wx(app=None): """Is the wx event loop running.""" - # New way: check attribute on shell instance - ip = get_ipython() - if ip is not None: - if ip.active_eventloop and ip.active_eventloop == 'wx': - return True - # Fall through to checking the application, because Wx has a native way - # to check if the event loop is running, unlike Qt. - - # Old way: check Wx application + # New way: check attribute on shell instance + ip = get_ipython() + if ip is not None: + if ip.active_eventloop and ip.active_eventloop == 'wx': + return True + # Fall through to checking the application, because Wx has a native way + # to check if the event loop is running, unlike Qt. + + # Old way: check Wx application if app is None: app = get_app_wx() if hasattr(app, '_in_event_loop'): @@ -121,12 +121,12 @@ def get_app_qt4(*args, **kwargs): def is_event_loop_running_qt4(app=None): """Is the qt4 event loop running.""" - # New way: check attribute on shell instance - ip = get_ipython() - if ip is not None: - return ip.active_eventloop and ip.active_eventloop.startswith('qt') - - # Old way: check attribute on QApplication singleton + # New way: check attribute on shell instance + ip = get_ipython() + if ip is not None: + return ip.active_eventloop and ip.active_eventloop.startswith('qt') + + # Old way: check attribute on QApplication singleton if app is None: app = get_app_qt4(['']) if hasattr(app, '_in_event_loop'): |
