X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5523df9f4b4fae15ab3f60b9f7bd11202e237f81..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/demo/PyPlot.py?ds=inline diff --git a/wxPython/demo/PyPlot.py b/wxPython/demo/PyPlot.py index f916dc6615..52387c5044 100644 --- a/wxPython/demo/PyPlot.py +++ b/wxPython/demo/PyPlot.py @@ -1,6 +1,12 @@ import wx -import wx.lib.plot + +hadImportError = False +try: + import wx.lib.plot +except ImportError: + hadImportError = True + ################################################################\ # Where's the code??? | @@ -32,13 +38,27 @@ class TestPanel(wx.Panel): 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 = """\

PyPlot