Python and Red Hat Linux 6

Martin Pool martinp at mincom.com
Mon Aug 2 21:12:46 EDT 1999


Bill Anderson wrote:
> Spud wrote:
> >
> > Yeah, using #!/bin/env/python should help, but Red Hat should support
> > pound-bang (#!) anyway. You might want to check in with tech support.
> >
> 
> Uhmm ... it is not RedHat, but a shell thing, and if #! didn't work,
> neither would #!/bin/env/python.

I think you mean

  #!/bin/env python

The command you're runing is /bin/env, and you're passing it the
parameter "python".  This doesn't work as well as it might because some
systems put env(1) in /usr/bin or /etc (!).  

Some systems are known to want a space after the bang so that they can
match the first four bytes as a magic number, but I don't think this
applies to GNU/Linux:

  #! /usr/bin/python

On GNU/Linux, the FSSTND ought to specify this: I think /usr/bin/python
should be safe because Python is standard on most distributions these
days.

-- 
 /\\\  Mincom | Martin Pool          | martinp at mincom.com
// \\\        | Software Engineer    | Phone: +61 7 3303-3333
\\ ///        | Mincom Ltd.          | 
 \///         | Teneriffe, Brisbane  | Speaking for myself only




More information about the Python-list mailing list