Hi,

 I just write a simplest file test.py with only one line--print "hello", when I run it in command line:
python test.py

the follow message comes out:

File "<stdin>" , line 1
 python test

SyntaxError: invalid syntax

but, the file can run in shell, also in the command line, I put

print "hello"

output is fine, "Hello"

thanks
Sharon

-------------------------------------------------------------------------
---------------------------

You're trying to run the file from the Python interpreter.
It does work in the shell, because that's what the shell does!
So, exit out of the Python interpreter before trying to run that command
(>>>exit, or Ctrl-D).

--
Corey Richardson
(Forgive the horrible formatting and HTML, on the road using a web client)


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to