[Python-Dev] PEP 370 - per-user scripts directory on Windows
Paul Moore
p.f.moore at gmail.com
Fri Feb 13 10:57:53 CET 2015
On 13 February 2015 at 09:47, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> I just thought of something ... as far as I know, we've enabled searching for a command on the path - since when a venv is active in the sense of VIRTUAL_ENV being defined, PATH is also set up so that the venv's Scripts folder is on it - so we would just need to find "python.exe" on the PATH and invoke that - no need to even use the value of VIRTUAL_ENV, making implementation simpler. What do you think?
Two comments:
1. I'm not sure (but I've not dug into the implementation yet) that
there's much practical difference between locating python.exe via a
PATH search, or locating it via concatenating VIRTUAL_ENV and the
relative path.
2. It would be a nice, although extremely obscure, feature to be able
to allow people who want to keep Python off their path to set
VIRTUAL_ENV but *not* set PATH, so that py.exe does the right thing
but there's *still* no python.exe on PATH. Limit the dependency on a
single environment variable rather than two, in other words.
Paul
More information about the Python-Dev
mailing list