unable to import wxPython.windows, Mac OS X

I've installed Python 2.3 final on my Mac OS X 10.2 machine. I used the
framework option when configuring and installing Python. I've also
installed wxWindows 2.4.1 and the devel version of wxPython 2.4.1.2 for
Python 2.3.

When I attempt to import wxPython.windows at the Python prompt, the first
attempt fails. The same command issued a second time works. Here's a copy
of what I type and the result:

[thoth@YellowEagle:~] > python
Python 2.3 (#4, Jul 31 2003, 00:11:15)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import wxPython.windows as w

20:09:20: Debug: wxMac library installation name is
'/usr/local/lib/libwx_macd-2.4.0.dylib'
20:09:20: Debug: wxMac resources file name is
'/usr/local/lib/libwx_macd-2.4.0.rsrc'
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packag
es/wxPython/windows.py", line 6, in ?
    from gdi import *
  File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packag
es/wxPython/gdi.py", line 7, in ?
    import wx
  File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packag
es/wxPython/wx.py", line 6, in ?
    from misc2 import *
  File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packag
es/wxPython/misc2.py", line 604, in ?
    class wxProcessPtr(wxEvtHandlerPtr):
NameError: name 'wxEvtHandlerPtr' is not defined

import wxPython.windows as w

Does anyone have any ideas what might be causing this behavior?

Thanks in advance.

···

--
Steven D. Arnold stevena@neosynapse.net
     "One has a moral responsibility to disobey unjust laws."
                        Martin Luther King
News and Opinion Covering Free-Speech Issues in Media & Technology:
            http://prime.neosynapse.net:8080/index.php

Steven D. Arnold wrote:

When I attempt to import wxPython.windows at the Python prompt, the first
attempt fails. The same command issued a second time works. Here's a copy
of what I type and the result:

Does anyone have any ideas what might be causing this behavior?

Because of the way that SWIG generates the .py modules there are some screwy import dependencies. You need to always import wxPython.wx first, which will then import all of the other core modules.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!