Hi @all
I use windows xp on my daytime job where I had installed Python 2.4.2 plus wxPython 2.8.0.1 - wx installed with wxPython2.8-win32-unicode-2.8.0.1-py24.exe
I had de-installed Python 2.4.2 and wxPython and the wx samples. Then I have installed Python 2.4.4 and again wxPython (with the very same installer as before).
Starting my GUI-based script now is causing an error, I don't understand. I have not changed any wx-related stuff in my script, and the wxPython version is the same. AFAIU only Python changed from 2.4.2 to 2.4.4.
Traceback (most recent call last):
File "D:\OpenSwarm\SVN\src\OpenSwarm\startGUI.py", line 51, in ?
import wx
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in ?
from wx._core import *
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 6, in ?
new_instancemethod = new.instancemethod
AttributeError: 'module' object has no attribute 'instancemethod'
I checked the wxPython samples, that I also have re-installed, and they seem to work.
I have no idea how to solve. G**gle refused to tell me what the gods have to say to me. But as we are used with oracles for some thousand years, probably I just asked the wrong question.
More success here? 
Best regards,
Anastasios
You have a file called new.py on your PYTHONPATH somewhere that is
preventing the standard lib new module from being imported. This is a
general Python problem rather than wxPython specific.
···
On 2/23/07, Anastasios Hatzis <ah@hatzis.de> wrote:
Hi @all
I use windows xp on my daytime job where I had installed Python 2.4.2
plus wxPython 2.8.0.1 - wx installed with
wxPython2.8-win32-unicode-2.8.0.1-py24.exe
I had de-installed Python 2.4.2 and wxPython and the wx samples. Then I
have installed Python 2.4.4 and again wxPython (with the very same
installer as before).
Starting my GUI-based script now is causing an error, I don't
understand. I have not changed any wx-related stuff in my script, and
the wxPython version is the same. AFAIU only Python changed from 2.4.2
to 2.4.4.
Traceback (most recent call last):
File "D:\OpenSwarm\SVN\src\OpenSwarm\startGUI.py", line 51, in ?
import wx
File
"C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line
45, in ?
from wx._core import *
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
line 6, in ?
new_instancemethod = new.instancemethod
AttributeError: 'module' object has no attribute 'instancemethod'
I checked the wxPython samples, that I also have re-installed, and they
seem to work.
I have no idea how to solve. G**gle refused to tell me what the gods
have to say to me. But as we are used with oracles for some thousand
years, probably I just asked the wrong question.
More success here? 
Best regards,
Anastasios
Chris Mellon wrote:
Hi @all
I use windows xp on my daytime job where I had installed Python 2.4.2
plus wxPython 2.8.0.1 - wx installed with
wxPython2.8-win32-unicode-2.8.0.1-py24.exe
I had de-installed Python 2.4.2 and wxPython and the wx samples. Then I
have installed Python 2.4.4 and again wxPython (with the very same
installer as before).
Starting my GUI-based script now is causing an error, I don't
understand. I have not changed any wx-related stuff in my script, and
the wxPython version is the same. AFAIU only Python changed from 2.4.2
to 2.4.4.
Traceback (most recent call last):
File "D:\OpenSwarm\SVN\src\OpenSwarm\startGUI.py", line 51, in ?
import wx
File
"C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line
45, in ?
from wx._core import *
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
line 6, in ?
new_instancemethod = new.instancemethod
AttributeError: 'module' object has no attribute 'instancemethod'
I checked the wxPython samples, that I also have re-installed, and they
seem to work.
I have no idea how to solve. G**gle refused to tell me what the gods
have to say to me. But as we are used with oracles for some thousand
years, probably I just asked the wrong question.
More success here? 
Best regards,
Anastasios
You have a file called new.py on your PYTHONPATH somewhere that is
preventing the standard lib new module from being imported. This is a
general Python problem rather than wxPython specific.
Oh, ...! Yep, I know a file with such name. I recently added a test module new.py to my project along with some others, directly in the same directory as my GUI script. This explains why the wxPython samples work, but not my GUI - it finds my own new.py first. My mistake.
Thanks for opening my eyes.
Best regards,
Anastasios
···
On 2/23/07, Anastasios Hatzis <ah@hatzis.de> wrote: