Possible dumb query

Gerhard Häring gh_pythonlist at gmx.de
Tue Feb 12 00:44:28 EST 2002


Le 12/02/02 à 07:24, ahimsa consulting écrivit:
> Greeting Pythonites
> 
> This might qualify as one of those "really dumb questions", but:

There is no such thing as a dumb question :-)

> Under Linux RH 7.2 when doing a search for which python ("$ which
> python") I have discovered that I have one entry for python as
> /usr/bin/python and one entry for python2.2 as /usr/bin/python2.2. My
> question is this: if I were to delete the directory /usr/bin/python
> what impact - if any - will it have on any of the libraries/ etc. that
> I would require to use python2.2

/usr/bin/python is a symlink to then "preferred" Python version, i. e.
the one that will be started when you enter "python" on a shell.

As you're using Redhat, which is terribly up-to-date in Python matters,
/usr/bin/python is a symlink to /usr/bin/python1.5 which is Python
1.5.2.

Deleting the symlink or changing it to the Python executable of your
Python 2.2 installation is not recommended. It will certainly break
things, as some Redhat system tools depend on Python 1.5, yet have a
hardcoded path "/usr/bin/python" in their first "shebang" line.

In short: Just invoke your Python 2.2 with "python2.2" and you will be
fine. Messing with the tools of the base system (like Python on Redhat)
can always be done, but you should be prepared to fix things that break.

So, when will Redhat finally make a symlink "/usr/bin/python-redhat" and
just use this one in their scripts!?

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 9.9 °C      Wind: 7.1 m/s




More information about the Python-list mailing list