[Tutor] Running Files with Command Lines

Alan Gauld alan.gauld at btinternet.com
Sun Feb 12 17:16:47 CET 2012


On 12/02/12 15:50, Yony Torres wrote:

> I'm trying to learn Python from a well known book,


Do0n;t make us guess, tell us the name of the book, well known or not. 
There is just a chance somebody else may have read it too!

> while i was working with the windows CMD
> c:\Python32>python

This is where you are going wrong.
You should not run python on its own, that gets you into the Python 
interpreter with its own >>> prompt. For this exercise you want to run 
your script directly from the OS prompt (on Windows usually ending in a 
single >)

> Can somebody please help me?

See the other posted replies about typing the command.
It will likely look like this(but all on a single line)

C:\Python32> python 
c:\Users\myusername\Documents\varios2\pythonjourney\script1.py

Don't put spaces in your paths, that will confuse Windows...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list