On 14 April 2015 at 08:10, Barry Warsaw <ba...@python.org> wrote: > But it fails unhelpfully when you use it in a shebang. > > $ /tmp/foo.py > bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or > directory > > Let's make the latter more helpful. >
>From a script authors point of view, it's currently safe to assume that a shebang like '#!/usr/bin/env python' will work on any Linux machine. In some cases (Arch) it may already refer to Python 3, but with some care it's entirely possible to write a script that can do the right thing on Python 2 or 3. If distros start to remove 'python', there's an interim period before it's safe to assume that 'python3' is available everywhere, and script authors currently don't have any good options to bridge that. I know Debian is all in on treating Python 2 and 3 as two entirely separate worlds, but that's not how everyone sees them. It would be nice to make some kind of affordance to people for whom they are two versions of the same language. Thomas