[Python-Dev] [PEPs] Support the /usr/bin/python2 symlink upstream
Michael Foord
fuzzyman at voidspace.org.uk
Mon Mar 7 21:09:21 CET 2011
On 07/03/2011 05:19, Mark Hammond wrote:
> [snip...]
>> (B) declare the Python version in the content of the script file. This
>> cures most of the ripple effects of the above, but requires a "launcher"
>> or "wrapper" program to be designed, implemented, and installed. There
>> are a variety of subsolutions for different ways of declaring the
>> version.
>
> <snip a few options>
>
> Without putting too much thought into it, I think a simple scheme
> could work where the path must either be "/usr/bin/python[23]?" or a
> fully-qualified path to a Python executable. IIUC, this should allow
> most scripts to have a shebang line that "does the right thing" on
> *nix and Windows systems while still offering maximum flexibility on
> Windows.
>
"/usr/bin/env python" is popular too, and it would be nice to support
the new aliases (or binaries) being created by the pep (python2 / python3).
Michael
>> By default, for Python, the wrapper would get associated only with .py
>> files.
>
> There would probably also need to be the same for ".pyw", but it would
> be almost identical to the .py handling.
>
> Cheers,
>
> Mark
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
--
http://www.voidspace.org.uk/
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
More information about the Python-Dev
mailing list