problem with interpreter

C

chusky

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.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
 
D

Diez B. Roggisch

chusky said:
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.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
 
F

Fredrik Lundh

chusky said:
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

wxPython tries to import the module "new" from Python's standard
library, but picks up a broken module named "new.py" from your
development directory instead.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top