Wx broken?

tmallen thomasmallen at gmail.com
Thu Jan 15 16:52:05 CET 2009

On Jan 15, 10:46 am, tmallen <thomasmal... at gmail.com> wrote:
> I've tried a few of the examples fromhttp://wiki.wxpython.org/Getting%20Started
> , but after "Hello World" (window) nothing works. I get the following
> error message with the other examples:
> Traceback (most recent call last):
>   File "C:/Documents and Settings/MyUserName/Desktop/WxExample.py",
> line 1, in <module>
>     import wx
>   File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx
> \__init__.py", line 45, in <module>
>     from wx._core import *
>   File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
> line 6, in <module>
>     new_instancemethod = new.instancemethod
> AttributeError: 'module' object has no attribute 'instancemethod'
> Here's a snippet that generates this error:http://pastebin.com/m2b4f4f9c
> For those familiar with wx here, is this a bug in the library, or
> should I be providing "instancemethod" at some point? Seeing that it's
> an unhandled exception, I do expect the former.
> Thanks,
> Thomas

Looking a little closer, this is what's causing the bug:

Wx: _core.py, lines 1-6:

# This file was created automatically by SWIG 1.3.29.
# Don't modify this file, modify the SWIG interface instead.

import _core_
import new
new_instancemethod = new.instancemethod

On this Win32 box, the "new" module doesn't have the "instancemethod"
attribute. What is new.instancemethod used for? "new_instancemethod,"
which should be assigned to the attr, does not show up again in this
particular source file.


More information about the Python-list mailing list