This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients paul.moore, steve.dower, tim.golden, vinay.sajip, wolma, zach.ware
Date 2015-02-20.17:07:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CACac1F8PsaP20uHYEyU624DoL1Utubd2G0B1DPwyM7Hpz_0pQA@mail.gmail.com>
In-reply-to <1424449901.12.0.867836301186.issue23465@psf.upfronthosting.co.za>
Content
On 20 February 2015 at 16:31, Wolfgang Maier <report@bugs.python.org> wrote:
>> 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.
>>
>
> Right, just that
>
> #!/usr/bin/env python3
>
> is a very plausible shebang line for a Python3 script for use under UNIX where #!/usr/bin/env python typically means python2.

That seems completely reasonable. Presumably this works for Unix
because virtualenvs have a "python3" executable installed, not just a
"python" executable?

> So, with the current patch users could still not use the py launcher from a virtual environment with scripts that are supposed to work under UNIX :(

Correct. That's not the problem this PEP is intended to solve. Another
PEP could be written to look at this, but I suspect it could be quite
hard to balance the various issues involved. As a start, maybe the
Python Windows installer should be writing a "python3.exe" as well as
"python.exe" and venv should put that in the virtualenv. (That's
certainly something that has been suggested in the past). That may be
a simpler solution than adding yet more complexity and special cases
to the launcher.

Personally, I don't have a need for this functionality, so I'm happy
to leave that PEP to someone else to write.
History
Date User Action Args
2015-02-20 17:07:31paul.mooresetrecipients: + paul.moore, vinay.sajip, tim.golden, zach.ware, steve.dower, wolma
2015-02-20 17:07:31paul.moorelinkissue23465 messages
2015-02-20 17:07:31paul.moorecreate