how to pass globals across modules (wxPython)
Hans Nowak
hans at zephyrfalcon.org
Mon Dec 20 19:14:45 EST 2004
More information about the Python-list mailing list
Mon Dec 20 19:14:45 EST 2004
- Previous message (by thread): how to pass globals across modules (wxPython)
- Next message (by thread): how to pass globals across modules (wxPython)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin Drautzburg wrote: > My wxPython program starts execution in mainFrame.py like this > [...] > class MainApp(wxApp): > def OnInit(self): > self.mainFrame = MainFrame(None) > self.mainFrame.Show() > self.SetTopWindow(self.mainFrame) > return True > > > def main(): > global application > application=MainApp(0) > application.MainLoop() > > > if __name__ == '__main__': > main() > > > I need to access the "application" object from other modules, actually > the windows and frames that live therein and I don't know how to do > this. If you just need to access the running application from other wxPython objects, then wx.GetApp() is your friend. -- Hans Nowak http://zephyrfalcon.org/
- Previous message (by thread): how to pass globals across modules (wxPython)
- Next message (by thread): how to pass globals across modules (wxPython)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list