[Tutor] Trouble running Python on Windows Vista

Alan Gauld alan.gauld at btinternet.com
Thu Jun 14 23:29:50 CEST 2012


On 14/06/12 20:19, Tom Avos wrote:
> Yes, If I open the file from the IDLE and then I press "f5" it works,
> but I want to know why it does not work if I write the filename after
> the ">>>" prompt . That way is much more handy, I would like to make it
> work.

Its  not really the same but you can just import it:

 >>> import triangulo   # note no .py

That will execute any runnable code in the file.

But its not really what the IDLE >>> prompt is intended for.

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





More information about the Tutor mailing list