Newbie Shell Editor Question

Kash khankf at hotmail.com
Sun Mar 27 13:04:28 EST 2005


Hi Everyone,

I am new to python. I have just installed it. I am went to the python
website and used it to download python and a beginners tutorial. I set
the environment variables as explained in the faq. 
However when I start idle and run a program from it; I get the
following types of errors; however I can run the same programs no
problem from my command prompt.
Can anyone please tell me what I am doing wrong? I thought Idle was
used to test programs in. I am able to open a new window and write
code, save it and then run that code; but just not if I type it into
the main idle window directly. 
Any help would greatly appreciated, thank you.
Kash

This is my error:
----------------------------
IDLE 1.1      
>>> python hello.py
SyntaxError: invalid syntax
>>> python hello
SyntaxError: invalid syntax
>>> exit
'Use File/Exit or your end-of-file key to quit IDLE'
>>> print "Hello"
Hello
>>> hello

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in -toplevel-
    hello
NameError: name 'hello' is not defined
>>> hello.py

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in -toplevel-
    hello.py
NameError: name 'hello' is not defined
>>> 



More information about the Python-list mailing list