Running python scripts from the command line.

Nanderson mandersonrandersonanderson at
Tue Feb 1 03:43:25 CET 2011

I've recently started to program. Python is my first language, so I'm
a complete beginner. I've been trying to call python scripts from the
command line by entering this command into it:


But it gives me this error message:

  File "<stdin>", line 1
SyntaxError: invalid syntax

I know that exists, and the script is correct (here is is

a = 1
if a:
    print 'Value of a is', a

I am using python 2.7.1 installed on Windows 7. This seems like
something that should be easy, so I'm sure I'm just missing a very
small problem. Any help is greatly appreciated.


More information about the Python-list mailing list