Skip to content
Snippets Groups Projects
Commit fe5ce888 authored by Duc Le's avatar Duc Le
Browse files

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
......@@ -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
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