I installed the 2.5.6 version from the following site: http://www.python.org/download/releases/2.5.6/ (the .tgz) It seems to have installed correctly but I am having problems when I go to use it. I Open up the Command line version and it looks ok but if I type any commands and try to execute them it gives me errors. This is my first venture into python and I could be doing this completely wrong. I am also unable to change directories using the command line. I have a Sample program in a directory: ex1.py I see the following in my command prompt:

Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64-bit (AMD64)] on Windows 32
Type "help", "copyright", "credits" or "license" for more information.
>>>

I entered the following:

>>> python ex1.py

The following message returned:

   File "", line 1
     python ex1.py
              ^
SytnaxError: Invalid syntax

Now it could be a syntax error but I do not see anything it is a simple "Hello world" program. I am not comfortable with the install and fear I may of screwed things up.

link|improve this question
feedback

1 Answer

You're supposed to type python ex1.py outside the Python shell, on the command prompt, not inside the Python shell.

link|improve this answer
I did this and I am getting a syntax error. My entire program is: Print "test!" I am not sure if i have downloaded a different version but the sample that I am learning from has this as the syntax. I must be missing something. – Silspar24 Jun 28 '11 at 0:42
@Silspar24 - it's print "test!" not Print "test!" – Sathya Jun 28 '11 at 2:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.