473,668 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "SyntaxErro r: 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 1916
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******** *************** ***********@pyt hon.org...
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 "SyntaxErro r: 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
4563
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 < test.o), all global definitions are automatically visible to the VxWorks command line interpreter, meaning I can call my test functions in whatever order I like. So far so good. Now I would like to port this code to Solaris. The problem is...
2
2975
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" id="d_links"> multiple <a href="hello.aspx?q=something">something</a><a href="hello.aspx?q=something1">something1</a><a
9
2430
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 having is with the line breaks. I am able to parse the string into the dataset up in till the line breaks. My pattern is as follows.. "^(?<n0>.{1})(?<n1>.{8})(?<n2>.{2})..... (?<n404>.{2})$" My code is as follows: Dim re as New...
0
2103
by: zenius | last post by:
Can anyone please give me an example how to create line chart graphic using VB.NET
1
2394
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 installed fine since I initially configured the interface. Welll, I got home today, tried to install the BUndle::CPAN module, and here is what was kicked back at me: $ sudo perl -MCPAN -e 'install Bundle::CPAN' CPAN: Storable loaded ok Going to...
0
1005
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 isn't a module, why not? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
0
1162
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 python? I've had a hell of a time finding something that doesn't segfault and is interoperable with .NET. As far as your problem goes, I would guess that somewhere you've got a class named SAML that's shadowing your module. See the difference in...
0
1079
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. Right now it is far enough along that it generates signed assertions. This is definitely a tangent but since you asked I use PyXMLSec. I wrote a blog post on compiling it for Windows so I wouldn't forget how I did it:...
1
5825
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 Signature: szAppName: perl.exe szAppVer:5.6.1.631 szModName:ntdll.dll szModVer:5.2.3790.3959 offset:000la379 Error Report Contents: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\WER59ce.dir00\perl.exe.mdmp...
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8378
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8791
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.