+StartUpDemo = "all"
+if __name__ == "__main__": # parse options if run stand-alone
+ # check options:
+ import sys, getopt
+ optlist, args = getopt.getopt(sys.argv[1:],'l',["local","all","text","map","stext","hit","hitf","animate","speed","temp","props"])
+
+ for opt in optlist:
+ if opt[0] == "--all":
+ StartUpDemo = "all"
+ elif opt[0] == "--text":
+ StartUpDemo = "text"
+ elif opt[0] == "--map":
+ StartUpDemo = "map"
+ elif opt[0] == "--stext":
+ StartUpDemo = "stext"
+ elif opt[0] == "--hit":
+ StartUpDemo = "hit"
+ elif opt[0] == "--hitf":
+ StartUpDemo = "hitf"
+ elif opt[0] == "--animate":
+ StartUpDemo = "animate"
+ elif opt[0] == "--speed":
+ StartUpDemo = "speed"
+ elif opt[0] == "--temp":
+ StartUpDemo = "temp"
+ elif opt[0] == "--props":
+ StartUpDemo = "props"
+import wx
+import time, random
+
+#---------------------------------------------------------------------------
+
+class TestPanel(wx.Panel):
+ def __init__(self, parent, log):
+ self.log = log
+ wx.Panel.__init__(self, parent, -1)
+
+ b = wx.Button(self, -1, "Show the FloatCanvas sample", (50,50))
+ self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+
+
+ def OnButton(self, evt):
+ if not haveNumeric:
+ dlg = wx.MessageDialog(self, errorText, 'Sorry', wx.OK |
+ wx.ICON_INFORMATION)
+ dlg.ShowModal()
+ dlg.Destroy()