def setUp(self): #rows = sys.path #for row in rows: # print row cfg = ConfigReader() cfg.read("../config.xml") Database.Open(cfg.GetPath(), cfg.GetUsername(), cfg.GetPassword())
def OnInit(self): if os.name == 'posix': print os.environ['PWD'] cfg = ConfigReader() cfg.read("../main/config.xml") Database.Open(cfg.GetPath(), cfg.GetUsername(), cfg.GetPassword()) frame = MainFrame(None, title="The Main Frame") self.SetTopWindow(frame) frame.Show(True) return True
appName = wx.GetApp().GetAppName() assert appName, "No App Name Set" config = wx.Config(appName) perspective = config.Read("perspective") if perspective: self._mgr.LoadPerspective(perspective) def Quit(self): self._mgr.UnInit() self.Destroy() class IAPanel(wx.Panel): def __init__(self, *args, **keys): wx.Panel.__init__(self, *args, **keys) self.test1 = wx.TextCtrl(self, wx.ID_ANY, 'Pane 1 - simple text') if __name__ == "__main__": #str=os.path.curdir #new if os.name == 'posix': print os.environ['PWD'] print platform.system() cfg = ConfigReader() cfg.read("config.xml") Database.Open(cfg.GetPath(), cfg.GetUsername(), cfg.GetPassword()) # end new app = MyApp(False) app.MainLoop()