Christopher Barker wrote:
Eric Ongerth wrote:
Is it as easy as changing my import conventions from "import wx" to
"from
wx import TextCtrl", or is it much more complicated than that?
It's got to be that easy! If it isn't, then that would be a very much needed change. That sounds like essential Python behavior.
It's much more complicated than that. wxPython relies on the bindings, which depend on the dlls. Even with a non-monolithic build, there are a lot of cross-dependencies.
It SHOULD be possible to at least remove some of the "big things" like aui, xrc, grid, etc, but that's not trivial either. Also, almost everything relies on wxCore, which has lots of basic building blocks like wxString, etc. Last I looked, the "extra" stuff was kind of small compared to the core stuff anyway.
That much should be possible already. The only extension modules imported by "import wx" are _core_, _gdi_, _windows_, _controls_, and _misc_. Last I checked those are the only modules that pyexe copies for simple wx apps. Paul, what errors did you get when you tried to eliminate XRC?
>>> import sys
>>> sys.modules.keys()
['cStringIO', 'copy_reg', '__main__', 'site', '__builtin__', 'encodings', 'posixpath', 'pprint', 'encodings.codecs', 'os.path', '_codecs', 'encodings.exceptions', 'stat', 'zipimport', 'warnings', 'encodings.types', 'UserDict', 'encodings.utf_8', 'sys', 'codecs', 'readline', 'types', 'signal', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'os']
>>> import wx
>>> sys.modules.keys()
['cStringIO', 'copy_reg', 'locale', 'wx.codecs', '__main__', 'site', '__builtin__', 'wx._gdi', 'wx.__version__', 'wx.locale', 'encodings', 'wx._core', 'posixpath', 'wx.types', 'pprint', 'encodings.codecs', 'wx._controls', 'wx._controls_', 'os.path', '_codecs', 'new', 'encodings.exceptions', 'wx._misc', 'wx._misc_', 'stat', 'zipimport', 'warnings', 'encodings.types', 'UserDict', 'swig_runtime_data2', 'encodings.utf_8', 'wx.new', 'sys', 'wx.swig_runtime_data2', 'codecs', 'wx._windows', 'readline', 'types', 'wx', '_locale', 'wx.sys', 'wx.wx', 'signal', 'wx._core_', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'os', 'wx._windows_', 'wx._gdi_']
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!