473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with interpreter

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
Sep 11 '08 #1
2 1144
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
Sep 11 '08 #2
chusky wrote:
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>

Sep 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Atul Kshirsagar | last post by:
I am embedding python in my C++ application. I am using Python *2.3.2* with a C++ extention DLL in multi-threaded environment. I am using SWIG-1.3.19 to generate C++ to Python interface. Now to...
1
by: Gabriel Cooper | last post by:
I'm running redhat 9 with python 2.3.3 and when I'm in gnome-terminal and inside the python interpreter I can't use the arrow keys anymore. They simply show ^[[A, ^[[B, etc. It doesn't appear to...
1
by: Donnie Leen | last post by:
I wrote a program embbed boost.python, each thread running a sub-interpreter, i made a module implement by boost.python, and i wish this module imported in each sub-interpreter, i find that the...
0
by: Mile Blenton | last post by:
Hello all, I am considering python as a 'scripting' language to be used in my application where users must be able to write their own code to access application data, use the application...
12
by: ishtar2020 | last post by:
Hi everybody I've been writing my very first application in Python and everything is running smoothly, except for a strange problem that pops up every once in a while. I'm sure is the kind of...
0
by: Tom Fredriksen | last post by:
Hi I am creating soap "proxy", of sorts, to hide a fubar soap server implemented by some proprietary guys. The point of the proxy server is to provide a SOAP 1.1 interface with described by...
78
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only...
3
by: Robin Becker | last post by:
As part of some django usage I need to get some ReportLab C extensions into a state where they can be safely used with mod_python. Unfortunately we have C code that seems incompatible with...
0
Bulldog
by: Bulldog | last post by:
I have been playing around with this issue for a while and seen some previous posting trying to address the problem but I haven't seen any answers to the problem so I am reposting it in my quest for...
6
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
I've encountered a problem using gettext with properties while using a Python interpreter. Here's a simple program that illustrate the problem. ============== # i18n_test.py: test of gettext &...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.