Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
9d2eaf34
Commit
9d2eaf34
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Relax Platform.haveGui requirements (temporarily, I hope!)
parent
1cdac302
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/utils/platform.py
+20
-2
20 additions, 2 deletions
fsl/utils/platform.py
with
20 additions
and
2 deletions
fsl/utils/platform.py
+
20
−
2
View file @
9d2eaf34
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Paul McCarthy
@paulmc
mentioned in issue
fsl/fsleyes/fsleyes#165 (closed)
·
5 years ago
mentioned in issue
fsl/fsleyes/fsleyes#165 (closed)
mentioned in issue fsl/fsleyes/fsleyes#165
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment