Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
fe5ce888
Commit
fe5ce888
authored
8 years ago
by
Duc Le
Browse files
Options
Downloads
Patches
Plain Diff
Re #17557 - added def in case no mpl to print warning.
parent
05cffd2e
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
scripts/PyChop/__init__.py
+4
-1
4 additions, 1 deletion
scripts/PyChop/__init__.py
with
4 additions
and
1 deletion
scripts/PyChop/__init__.py
+
4
−
1
View file @
fe5ce888
...
...
@@ -17,9 +17,12 @@ resolution, flux = PyChop2.calculate(inst='maps', chtyp='a', freq=500, ei=600, e
PyChop2.showGUI()
"""
import
warnings
from
.PyChop2
import
PyChop2
# If the system doesn't have matplotlib, don't import the GUI.
try
:
from
.PyChopGui
import
show
as
showGUI
except
ImportError
:
pass
def
showGUI
():
warnings
.
warn
(
"
PyChop GUI disabled: Cannot import Matplotlib.
"
,
RuntimeWarning
)
return
None
This diff is collapsed.
Click to expand it.
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