Re: passing an option to the python interpreter

2014-03-02 Thread Anssi Saari
Marko Rauhamaa writes: > Jabba Laci : > >> I tried this: >> >> #!/usr/bin/env python -u > > The hash-bang notation is quite rigid; it only accepts a single argument > ("python") to the command ("/usr/bin/env"). > > I don't know if there is a simple workaround. Using the relevant environment vari

Re: passing an option to the python interpreter

2014-02-15 Thread Chris Angelico
On Sun, Feb 16, 2014 at 9:32 AM, Jabba Laci wrote: > #!/usr/bin/env python -u > > But if I want to run it from the command line ($ ./unbuffered.py), I > get this error: > > /usr/bin/env: python -u: No such file or directory > > env is looking for "python -u" but such a command doesn't exist. > > H

Re: passing an option to the python interpreter

2014-02-15 Thread Marko Rauhamaa
Jabba Laci : > I tried this: > > #!/usr/bin/env python -u The hash-bang notation is quite rigid; it only accepts a single argument ("python") to the command ("/usr/bin/env"). I don't know if there is a simple workaround. Marko -- https://mail.python.org/mailman/listinfo/python-list

passing an option to the python interpreter

2014-02-15 Thread Jabba Laci
Hi, The first line in my scripts looks like this: #!/usr/bin/env python I would like to use unbuffered output in a script, which can be done with the -u option, thus I tried this: #!/usr/bin/env python -u But if I want to run it from the command line ($ ./unbuffered.py), I get this error: /us