473,387 Members | 1,548 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,387 software developers and data experts.

help! - cmd line interpreter gone "dumb"

Tim
Maybe I've been working too long, but has anyon had their python interpreter
stop taking commands.

The IDLE version works fine, but under Windoze:

1) execute "python" in teh command shell
2) ...interpreter comes up fine
3) type in anything and you get "SyntaxError: invalid syntax"

Literally, you could type in "import sys" or anything common and you get the
same results.

Any help greatly appreciated--thanks.

Tim

Jul 18 '05 #1
2 1902
Tim
Yes, reboot or have the programmer give his head a shake. ;-)

I love this language, but getting used to the little set up details I
guess...Half of it was my own ignorance, but it's not obvious.

For the record...

if I don't define any paths for Python, it naturally knows were to go for
the core + libraries.
but, if you define the PYTHONPATH in the environment--only those directories
are searched. It was probably the late night that had me forget when I
changed things (funny--its seemed to work for a long while, but the changes
may not have been reflected if I had the same command window open the entire
evening (this was the case, I think).

It makes sense...

Tim

"Gerhard Häring" <gh@ghaering.de> wrote in message
news:ma**********************************@python.o rg...
Tim wrote:
Maybe I've been working too long, but has anyon had their python interpreter stop taking commands.

The IDLE version works fine, but under Windoze:

1) execute "python" in teh command shell
2) ...interpreter comes up fine
3) type in anything and you get "SyntaxError: invalid syntax"

Literally, you could type in "import sys" or anything common and you get the same results.


I've seen that when I used os.spawn* (or was it os.execv*?), apparently
in a wrong way.
Any help greatly appreciated--thanks.


Typical Windows answer: reboot and try again ;-)

-- Gerhard

Jul 18 '05 #2
Tim wrote:

For the record...

if I don't define any paths for Python, it naturally knows were to go for
the core + libraries.
but, if you define the PYTHONPATH in the environment--only those directories
are searched. It was probably the late night that had me forget when I
changed things (funny--its seemed to work for a long while, but the changes
may not have been reflected if I had the same command window open the entire
evening (this was the case, I think).


This wasn't likely the cause of all your problems. Try defining
that environment variable again, and check whether "import sys"
really does give a syntax error. If it does, it's something else,
because all PYTHONPATH should do is let you add more stuff to
the standard search path. (If you can get import sys to work,
type "sys.path" to see what is defined, and you'll see that the
stuff in PYTHONPATH merely goes at the front, just after the ''
item which means the directory from which the script runs.)

If you are really getting a syntax error, paste the full traceback
into another posting so we can see what it is. Maybe you were
typing with CAPSLOCK on? Or you had a module of your own in the
current directory, called sys.py, and it contained a syntax error,
so when you imported it you got confused? Definitely something
other than PYTHONPATH, I think.

-Peter
Jul 18 '05 #3

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

Similar topics

7
by: Ryan | last post by:
I was wondering if anyone could lend a hand with the following issue... I am testing application code (C++) that is currently built for the VxWorks platform. When loading in the object code (ld...
2
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
9
by: jsummit | last post by:
I'm trying to parse a rather large string from a .txt file that breaks into 2 lines ( the string is a fixed-length string reaching 6694 characters) into a dataset using VB.net. The issues that I am...
0
by: zenius | last post by:
Can anyone please give me an example how to create line chart graphic using VB.NET
1
numberwhun
by: numberwhun | last post by:
Ok, I have an issue and I am not sure what is causing it. I am working on a Fedora Core 7 Linux machine (my laptop). I have not had any problems with installing modules via CPAN. All has...
0
by: Steve Holden | last post by:
Jeff Tchang wrote: Look for assignments to "SAML" in your code, or a class definition of something called SAML. That message should read "module object "SAML' has no attribute 'Subject'". If SAML...
0
by: John Krukoff | last post by:
On Tue, 2008-11-18 at 10:45 -0800, Jeff Tchang wrote: Random related question. If you're writing a SAML implementation have you found an XML Signature implementation that works reliably from...
0
by: Jeff Tchang | last post by:
Random related question. If you're writing a SAML implementation have I guess you could call it a SAML implementation. Really I am writing it so I can get more familiar with the specification....
1
by: santhanalakshmi | last post by:
Hi, In Windows 2003, i installed the Active Perl. When i log into this system, i am facing this error "Perl command line interpreter encountered a problem and needed to close" Error...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.