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 Steve Barnes
Recipients Steve Barnes, eryksun, paul.moore, ricpol, steve.dower, tim.golden, vinay.sajip, wdhwg001, zach.ware
Date 2017-05-14.08:36:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494750993.44.0.0616180473289.issue28686@psf.upfronthosting.co.za>
In-reply-to
Content
If the user is operating in a virtual environment they are ring fenced and, presumably, don't wish any other versions of python to be used, (regardless of the SheBang in the files).

Since we don't AFAIK have any possibility of mixed virtual environments ignoring SheBangs should meet the basic requirements of operating inside of a venv.

How about a simple, but brutal approach, of if VIRTUAL_ENV is set in the current environment then always use the virtual environment python and launch with the -x option (ignore first line). This is the equivalent of using a version specifier as well as having a SheBang. This way the wrong python for the script might be executed but that is the responsibility of the person who set up the venv.
History
Date User Action Args
2017-05-14 08:36:33Steve Barnessetrecipients: + Steve Barnes, paul.moore, vinay.sajip, tim.golden, zach.ware, eryksun, steve.dower, wdhwg001, ricpol
2017-05-14 08:36:33Steve Barnessetmessageid: <1494750993.44.0.0616180473289.issue28686@psf.upfronthosting.co.za>
2017-05-14 08:36:33Steve Barneslinkissue28686 messages
2017-05-14 08:36:33Steve Barnescreate