Title: Python launcher for windows should search path for #!/usr/bin/env
Type: enhancement Stage: resolved
Components: Windows Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: paul.moore, python-dev, vinay.sajip
Priority: normal Keywords: patch

Created on 2013-05-04 10:12 by paul.moore, last changed 2013-06-07 23:01 by vinay.sajip. This issue is now closed.

Messages (3)
msg188347 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2013-05-04 10:12
The Python launcher for windows should recognise a hashbang line of #!/usr/bin/env python, and use the python executable found on PATH to run the script. If no python executable is present on PATH the launcher should fall back to the current behaviour (using the default python, as if #!/usr/bin/python were present).

This matches the behaviour on other platforms where env is used to ensure that the script uses the user's currently activated Python, and is particularly important when virtualenvs are being used.
msg188449 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2013-05-05 17:06
There is a patch for this (against the standalone pylauncher project) at
msg190748 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-06-07 14:37
New changeset a174d79cef2e by Vinay Sajip in branch 'default':
Issue #17903: Added path search changes to launcher.
Date User Action Args
2013-06-07 23:01:12vinay.sajipsetstatus: open -> closed
resolution: fixed
stage: resolved
2013-06-07 14:37:49python-devsetnosy: + python-dev
messages: + msg190748
2013-05-05 17:06:32paul.mooresetkeywords: + patch

messages: + msg188449
2013-05-04 10:12:42paul.moorecreate