[Tutor] python 2.7.1

Alan Gauld alan.gauld at btinternet.com
Thu Sep 6 11:24:09 CEST 2012

On 20/08/12 05:47, john wrote:
> print"hello world"#this is just something to say

>  >>> /Users/jonathan/Documents/hello.py

You don;t run Python scripts from the python prompt. You only type 
Python co0mmands there. You could import your file which wiull run it 
but the effect is slightly different. Its better to run scripts from the 
OS prompt

$ python /Users/jonathan/Documents/hello.py

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list