Don't show a dialog upon import when Numeric isn't installed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-26 01:51:29 +00:00
parent fa4c1d1d41
commit 5c4c285a9e

View File

@@ -27,15 +27,18 @@ try:
import Numeric import Numeric
except: except:
# bummer! # bummer!
d = wx.wxMessageDialog(wx.NULL, msg = """This module requires the Numeric module, which could not be
"""This module requires the Numeric module, which could not be imported. imported. It probably is not installed (it's not part of the standard
It probably is not installed (it's not part of the standard Python Python distribution). See the Python site (http://www.python.org) for
distribution). See the Python site (http://www.python.org) for information on downloading source or binaries."""
information on downloading source or binaries.""",
"Numeric not found") if wxPlatform == '__WXMSW__':
if d.ShowModal() == wx.wxID_CANCEL: d = wx.wxMessageDialog(wx.NULL, msg, "Numeric not found")
d = wx.wxMessageDialog(wx.NULL, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.wxOK) if d.ShowModal() == wx.wxID_CANCEL:
d.ShowModal() d = wx.wxMessageDialog(wx.NULL, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.wxOK)
d.ShowModal()
else:
print msg
raise ImportError raise ImportError
# #