#! independent of location of python binary
Fredrik Lundh
effbot at telia.com
Wed Sep 20 11:20:42 EDT 2000
Harald wrote:
> In Tcl I write
>
> #!/bin/sh
> # \
> exec tclsh "$0" ${1+"$@"}
>
> and the tclsh will be found along the path.
>
> How can I do this in python.
the usual way to do this is:
#! /usr/bin/env python
for more info, and a couple of alternatives, see
FAQ entry 4.63:
http://www.python.org/doc/FAQ.html#4.63
4.63. How do I make a Python script executable on Unix?
</F>
More information about the Python-list
mailing list