From: Brad A. <br...@al...> - 2005-08-09 19:19:12
|
It's a bit awkward to use wxselect with PythonCard because there is no single configuration file for this. This is because PythonCard can be invoked from a variety of different starting places. How about creating a wxinitialize module that would be called at the top of every PythonCard module before the import wx statement? It would utilize a simple wxConfig file designed to be easy to edit by end users. wxInitialize.py would look very simple, something like this: ------------------------------------- wxInitialize.py -------------------------- from wxConfig import wxSelectValue try: import wxversion wxversion.select(wxSelectValue) except Exception, thisErr: print thisErr import wx print 'wx.PlatformInfo:', wx.PlatformInfo print 'wx.VERSION:', wx.VERSION #we could also add assert statement for minimum wx version -------------------------------------------- The config file would look something like this: --------------------------- wxConfig.py ---------------------------------------- wxSelectValue=['2.6-ansi'] -------------------------------------------- |