Author paul.moore
Recipients paul.moore, steve.dower, tim.golden, vinay.sajip, wolma, zach.ware
Date 2015-02-20.16:17:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424449034.52.0.756009038854.issue23465@psf.upfronthosting.co.za>
In-reply-to
Content
Hmm, I didn't know that (although virtualenv-based environments don't have an equivalent to pyvenv.cfg).

But there's some confusion here. This patch only affects command line usage (running "py.exe" to start Python). I don't really see a use case for making "py -3" mean "the virtualenv if it's Python 3 otherwise ignore the virtualenv and use the system Python 3".

For scripts, shebang processing isn't altered. Nothing uses a virtualenv except "#!/usr/bin/env python". And that does so only because it searches PATH before looking at the registry. If you use "#!/usr/bin/env python3" it won't see a virtualenv because there is no python3.exe in a virtualenv...

The scope of this PEP is just to make the "py" command (with no explicit version) use an active virtualenv before falling back to the default Python. This is specifically to allow people who don't put Python on their PATH but use virtualenvs to use "py" consistently, rather than having to switch to "python" when they are in a virtualenv. See the PEP (specifically the rationale section) for details.
History
Date User Action Args
2015-02-20 16:17:14paul.mooresetrecipients: + paul.moore, vinay.sajip, tim.golden, zach.ware, steve.dower, wolma
2015-02-20 16:17:14paul.mooresetmessageid: <1424449034.52.0.756009038854.issue23465@psf.upfronthosting.co.za>
2015-02-20 16:17:14paul.moorelinkissue23465 messages
2015-02-20 16:17:14paul.moorecreate