How to run Python file?

Rick Zantow rzantow at gmail.com
Sun Sep 3 02:54:41 CEST 2006


"mistral" <polychrom at softhome.net> wrote in news:1157239512.139823.15650
@74g2000cwt.googlegroups.com:

[...]
> Assuming I have Windows XP, and I installed ActiveState Python. No any
> other additional manipulations were done, no any PATHEXTes environment
> variables, etc, etc, nothing. How many preparatory work required to 
run
> one small python file?
> 

I hope I'm understanding your question correctly. 

I can't really answer with regard to ActiveState's version. I've only 
used the Python.org binary installation for a long time, and it does set 
up the path on installation. I don't think it adds the PATHEXT, but I 
really don't remember; I've had some version on my computer since Python 
1.5.2. Without that, though, all you'd need would be to type
> python test.py 
... given the other assumptions you've indicated. Oh, if you are running 
the python program (located in a directory not in your path) from some 
other directory, you'd need to specify the full pathname, I suppose, 
like
> python c:\dir\test.py

I'd assume that ActiveState also sets the path up, but again, I can't 
say for sure that it does. If it doesn't, then you'd add the Python root 
directory to your path or else you'd have to specify *that* each time as 
well.

-- 
rzed




More information about the Python-list mailing list