[Python-Dev] Python install layout and the PATH on win32

VanL van.lindberg at gmail.com
Tue Mar 20 17:28:04 CET 2012


On 3/20/2012 11:19 AM, "Martin v. Löwis" wrote:
> No - there is an version #3a: 3.a) Get a shell and run the script CD 
> into the directory, then directly run foo.py, without prefixing it 
> with python.exe. This doesn't require any changes to the path, and is 
> shorter in usage than having the path specified. With PEP 397, you 
> will be able to run "py foo.py" without path modification, and it will 
> get the correct Python version even (which neither the path 
> manipulation nor the file association could achieve). 

There is also one more scenario, assuming that your project includes 
other libraries. You can run setup.py directly in your example, but what 
about pip or easy_install? Both of those require the binaries directory 
to also be on the PATH - requiring at least a little PATH manipulation.

Thanks,
Van


More information about the Python-Dev mailing list