How to run Python file?

Rick Zantow rzantow at gmail.com
Sat Sep 2 14:08:43 EDT 2006


"Ant" <antroy at gmail.com> wrote in news:1157218244.750434.36220
@h48g2000cwc.googlegroups.com:

> 
> zefciu wrote:
>> Pontus Ekberg wrote:
> ...
>> > $ python test.py
>> >
>> > or
>> >
>> > $ ./test.py (if test.py is executable)
>> >
>> >
>> Thats if you use un*x.  If you word under windows, the first would 
work,
> 
> As would:
> 
>> test.py
> 
> Assuming python grabbed the .py extensions correctly (which it shouold
> have done with any recent version).
> 
> 

As would:

> test

... assuming you're on windows (Win2K or WinXP at least) and you've 
added ".py" to your PATHEXT environment variable.

-- 
rzed



More information about the Python-list mailing list