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

random832 at fastmail.us random832 at fastmail.us
Thu Mar 12 22:49:42 CET 2015


On Thu, Mar 12, 2015, at 17:33, Paul Moore wrote:
> On 12 March 2015 at 20:49,  <random832 at fastmail.us> wrote:
> > Though, speaking of the posix shell script exec issue, and to wrench
> > things back on topic... what about allowing python scripts to start with
> > the line "exec python [options...] $0", a line which will be ignored by
> > the python interpreter?
> 
> Can't you use the -x option (skip first line of source) for that?
> Paul

I'd guess the "DOS specific hack" it is intended for is, in fact,
precisely "run the python interpreter using the native scripting
language in the first line". So... I guess you could.

Might be worth cleaning up the line number issue and replacing the env
hack with it going forward, given, you know, POSIX compliance.


More information about the Python-ideas mailing list