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

Oleg Broytman phd at phdru.name
Wed Mar 11 21:22:35 CET 2015


Hi!

On Wed, Mar 11, 2015 at 01:43:25PM -0600, Neil Schemenauer <nas-python at arctrix.com> wrote:
[skip]
> a script starting with 
> 
>     #!/usr/bin/python -x -3
[skip]

   That wouldn't work. Shebang line accepts one and only one parameter.
There are operating systems that allow more but they are exceptions.

$ cat test1
#! /usr/local/bin/python -x3
print "Ok"

$ ./test1
Ok

$ cat test2
#! /usr/local/bin/python -x -3
print "Ok"

$ ./test2
Unknown option: - 
usage: /usr/local/bin/python [option] ... [-c cmd | -m mod | file | -]
[arg] ...
Try `python -h' for more information.

$ cat test3
#! /usr/bin/env python -x3
print "Ok"

$ ./test3
env: python -x3: No such file or directory

$ cat test4
#! /usr/bin/env python -x -3
print "Ok"

$ ./test4
env: python -x -3: No such file or directory

$ uname -rs
FreeBSD 9.3-RELEASE

>   Neil

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list