[Python-ideas] Migration of /usr/bin/python to python3

Barry Warsaw barry at python.org
Thu Mar 12 22:52:20 CET 2015


On Mar 11, 2015, at 09:38 PM, M.-A. Lemburg wrote:

>I think the migration should start with modifying scripts to use
>
>#!/usr/bin/env python2
>
>when they are Python 2 only (*) and
>
>#!/usr/bin/env python3
>
>when they are Python 3 only and
>
>#!/usr/bin/env python
>
>only when they support both Python 2 and 3.

Mostly, I agree, although I would not recommend /usr/bin/env for system
installed scripts.  Using /usr/bin/env is fine for development trees, but a
really bad idea for anything installed in system locations.  Modify your
suggestion to /usr/bin/python2 and /usr/bin/python3 and I'm on board. :)

I would very much like to see explicit use of /usr/bin/python2 replace
/usr/bin/python for scripts.

Then I think the problem is, what do users expect when they type

$ python foo.py

at their shell prompt?

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150312/31800003/attachment.sig>


More information about the Python-ideas mailing list