problem with interpreter

Diez B. Roggisch deets at nospam.web.de
Thu Sep 11 08:35:26 EDT 2008


chusky wrote:

> Hi !
> 
> I have Python installed on C:\Python25
> Yesterday I added new "wx" library to the Python
> 
> when I run C:\Python25\python.exe from the command line there is a
> problem with finding libraries:
> 
> C:\Python25>python.exe
> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import wx
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\__init__.py",
> line 45,
> in <module>
>     from wx._core import *
>   File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\_core.py",
> line 5, in <
> module>
>     import new
>   File "new.py", line 1
>     import
>          ^
> SyntaxError: invalid syntax
>>>>
> 
> 
> /////////////////////
> 
> .... that problem doesn't exist when I run python.exe from different
> location (C:\, D:\) with python in the system path

Do you by any chance have a file "new.py", or new.pyc lying around? It's
always a bad idea to name your own modules after standard-modules (new is a
standard-module), as they might get picked up first.

Diez



More information about the Python-list mailing list