import wx
-import wx.lib.plot
+
+hadImportError = False
+try:
+ import wx.lib.plot
+except ImportError:
+ hadImportError = True
+
################################################################\
# Where's the code??? |
def runTest(frame, nb, log):
- win = TestPanel(nb, log)
+ if not hadImportError:
+ win = TestPanel(nb, log)
+ else:
+ from Main import MessagePanel
+ win = MessagePanel(nb, """\
+This demo requires the Numeric or numarray module,
+which could not be imported. It probably is not installed
+(it's not part of the standard Python distribution). See the
+Python site (http://www.python.org) for information on
+downloading source or binaries.""",
+ 'Sorry', wx.ICON_WARNING)
+
return win
#----------------------------------------------------------------------
-overview = """\
+if hadImportError:
+ overview = ""
+else:
+ overview = """\
<html><body>
<center><h2>PyPlot</h2></center>