MCPcopy Create free account
hub / github.com/ipython/ipython / is_event_loop_running_wx

Function is_event_loop_running_wx

IPython/lib/guisupport.py:79–95  ·  view source on GitHub ↗

Is the wx event loop running.

(app=None)

Source from the content-addressed store, hash-verified

77 return app
78
79def is_event_loop_running_wx(app=None):
80 """Is the wx event loop running."""
81 # New way: check attribute on shell instance
82 ip = get_ipython()
83 if ip is not None:
84 if ip.active_eventloop and ip.active_eventloop == 'wx':
85 return True
86 # Fall through to checking the application, because Wx has a native way
87 # to check if the event loop is running, unlike Qt.
88
89 # Old way: check Wx application
90 if app is None:
91 app = get_app_wx()
92 if hasattr(app, '_in_event_loop'):
93 return app._in_event_loop
94 else:
95 return app.IsMainLoopRunning()
96
97def start_event_loop_wx(app=None):
98 """Start the wx event loop in a consistent manner."""

Callers 1

start_event_loop_wxFunction · 0.85

Calls 2

get_ipythonFunction · 0.90
get_app_wxFunction · 0.85

Tested by

no test coverage detected