Banibrata Dutta wrote:

On 5/6/08, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
At our site we run  IRIX, UNICOS, Solaris, Tru64, Linux, cygwin and
other unixy OSes.

We have python installed in a number of different places:
/bin/python
/usr/local/bin/python
/usr/bin/python
/opt/freeware/Python/Python-2.5.1/bin/python
~mataap/platform/python/python-2.5.1

So I cannot assume a single location for python.  Nor for any other
tool, really.  Bash for example.  It may indeed be in /usr/bin on many
systems, on many others it is not.

Note the version specific install points.  This allows us to switch
over easily to different versions, and keep older versions in case
they are needed.  We can test new versions before cutting over to them
operationally. (This matters for tools that are still changing, like
python or bash.)

We use the very handy 'modules' package (not python modules, not
fortran modules) to adjust our paths and environment variables as
needed.

Some of the install points are determined by policy, or historical
constraints, or hardware limits, or file system layout.

Now it is true that it is easy to edit a single script to change the
hashbang line.  It is not easy to change several hundred scripts, on
different machines.  It is easy to adjust the environment to point to
the right python path, and have all your scripts pick it up
automatically.

Looks reasonable thing to do...

Use /usr/bin/env.  If env is not in /usr/bin, put a link to it there.

So why not put symlink to Python over there on all machines, if we can
put one (or env itself) there ?

A symlink directly to python (or whatever) would not help when testing version x.y.z, while still leaving version a.b.c in place for the other tools/scripts/programs to keep using.
--
Ethan
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to