dabo Commit
Revision 7050
Date: 2012-01-12 11:58:30 -0800 (Thu, 12 Jan 2012)
Author: Ed
Trac: http://trac.dabodev.com/changeset/7050
Changed:
U trunk/demo/samples/dLinePlot.py
Log:
Added try/except handler for cases where numpy is not installed.
Diff:
Modified: trunk/demo/samples/dLinePlot.py
===================================================================
--- trunk/demo/samples/dLinePlot.py 2012-01-11 23:09:16 UTC (rev 7049)
+++ trunk/demo/samples/dLinePlot.py 2012-01-12 19:58:30 UTC (rev 7050)
@@ -3,12 +3,19 @@
dabo.ui.loadUI("wx")
import dabo.dEvents as dEvents
from dabo.dLocalize import _
-import numpy.oldnumeric as _Numeric
+try:
+ import numpy.oldnumeric as _Numeric
+except ImportError:
+ _Numeric = None
+
class TestPanel(dabo.ui.dPanel):
def afterInit(self):
+ if not _Numeric:
+ txt = _("The numpy oldnumeric module is not installed")
+ dabo.ui.dLabel(self, Caption=txt, FontSize=12,
ForeColor="red")
+ return
self.linePlot = self.createLinePlot()
-
sz = self.Sizer = dabo.ui.dSizer("h")
sz.append(self.createControlPanel(self.linePlot), "expand")
sz.appendSpacer(10)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]