[Python-Dev] Re: cgitb.py for Python 2.2

Fred L. Drake, Jr. fdrake@acm.org
Sat, 4 Aug 2001 12:03:06 -0400 (EDT)

Greg Ward writes:
 > Grumble.  Andrew and I tried to track this down once, and found
 > suspicious-looking code in the kernel (ie., I don't think it's the fault
 > of GNU env).

  I had always understood that the sh-bang line could only provide a
single argument to begin with.  I don't know what you found in the
kernel sources, but I'd expect it to be implementing that policy.  So
/usr/bin/env gets one parameter from the sh-bang line, "python", and
then another parameter added by the kernel: the name of the script.
  Sounds about right to me.  Whether we like the constraint that there
be only one arg from the sh-bang line doesn't really matter; lots of
systems enforce this constraint, so to be portable we need to live
with it.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation