don't show the message dialog on import unless there is already an app object
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,14 +51,13 @@ imported. It probably is not installed (it's not part of the standard
|
|||||||
Python distribution). See the Python site (http://www.python.org) for
|
Python distribution). See the Python site (http://www.python.org) for
|
||||||
information on downloading source or binaries."""
|
information on downloading source or binaries."""
|
||||||
|
|
||||||
if wx.Platform == '__WXMSW__':
|
print msg
|
||||||
|
if wx.Platform == '__WXMSW__' and wx.GetApp() is not None:
|
||||||
d = wx.MessageDialog(None, msg, "Numeric not found")
|
d = wx.MessageDialog(None, msg, "Numeric not found")
|
||||||
if d.ShowModal() == wx.ID_CANCEL:
|
if d.ShowModal() == wx.ID_CANCEL:
|
||||||
d = wx.MessageDialog(None, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.OK)
|
d = wx.MessageDialog(None, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.OK)
|
||||||
d.ShowModal()
|
d.ShowModal()
|
||||||
else:
|
raise
|
||||||
print msg
|
|
||||||
raise ImportError
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Plotting classes...
|
# Plotting classes...
|
||||||
|
Reference in New Issue
Block a user