[Tutor] Trouble running Python on Windows Vista

Alan Gauld alan.gauld at btinternet.com
Thu Jun 14 18:37:00 CEST 2012

On 14/06/12 16:30, Tom Avos wrote:

> It works fine when working in Interactive Mode or by  Opening a .py file
> from the IDLE and then running it by pressing F5, but I can not run .py
> files by invoking them from the prompt (neither from IDLE nor Dos
> Command Line);

It looks like you are trying to run them from the Python prompt but you 
need to run them from the DOS prompt (or Windows Explorer as you 

At the DOS prompt (looking something like C:\WINDOWS>) you type

python C:\Full\Path\To\File\triangulo.py

ie you need to tell Python where to find the file, python does not use 
the DOS PATH value. Alternatively CD into the folder with the .py file
and Python will find it in the local folder.

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list