Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python syntax error

Name: Anonymous 2008-04-14 16:14

sup /prog/

I literally just started learning Python, and I apparently am already confused. Trying to execute a basic "print 'Hello world!' from the cmd prompt (XP) is returning a syntax error.

The entirety of the script is as follows:
#! c:\Python25\
print "Hello, world!"

Trying to execute the file yields this:
>>> python script.py
  File "<stdin>", line 1
    python script.py
                ^
SyntaxError: invalid syntax

(parser is under the t in case the formatting doesn't work)

I can run the module from IDLE, but not from the command prompt. Ideas?

Name: Anonymous 2008-04-14 16:31

try
import script

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List