[Tutor] a newbie question

alan.gauld@bt.com alan.gauld@bt.com
Fri, 24 Aug 2001 09:49:43 +0100

> I tried to run program stored in the interpreter under window 
> 98.  Here is the path, C:\DownLoad\practice python\p17.py

>>>execfile(C:\DownLoad\practice python\p17.py)

Try putting the filename in quotes? I think execfile takes 
a string as its argument.

But why are you doing this? There are some valid situations
to use execfile but they are rare.

Usually you just execute a python script from a DOS prompt
by typing

C:\> C:\Download\practice\p17.py

OR if file associations are not set:

C:\> python C:\Download\practice\p17.py


Alan G