On Sun, Jan 20, 2008 at 07:30:03PM +0100, Christian Heimes wrote: > Oleg Broytmann wrote: > > #! /usr/bin/env python -O > > > > [trying to execute the script on Linux] > > > > /usr/bin/env: python -O: No such file or directory > > > > Oleg. > > Oh right. I was sure that I've seen a shebang with options somewhere. It > might have been a shell script or a perl script.
Yes, one can write #! /usr/bin/python -O This works. The OS (exec system call) splits the string into a program (python) and a single parameter (-O), and python knows how to handle -O. The problem with #! /usr/bin/env python -O is that exec splits it into a program (env) and a single parameter (python -O) and env doesn't know how to run "python -O". > Yet another python executable could solve the issue I doubt it. It is env that doesn't know how to run "python -O" in my example, not python's problem. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com