Skip to content
Snippets Groups Projects
Commit 9d2eaf34 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Relax Platform.haveGui requirements (temporarily, I hope!)

parent 1cdac302
No related branches found
No related tags found
No related merge requests found
......@@ -163,9 +163,27 @@ class Platform(notifier.Notifier):
try:
import wx
app = wx.GetApp()
# TODO Previously this conditional
# also used app.IsMainLoopRunning()
# to check that the wx main loop
# was running. But this doesn't
# suit situations where a non-main
# event loop is running (e.g. when
# the event loop is being run by
# IPython).
#
# In c++ wx, there is the
# wx.App.UsesEventLoop method, but
# this is not presently exposed to
# Python code.
#
# So this constraint has been
# (hopefully) temporarily relaxed
# until UsesEventLoop can be called
# from Python.
return (self.canHaveGui and
app is not None and
app.IsMainLoopRunning())
app is not None)
except ImportError:
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment