Python 1.5.x vs Python 2.x.x

Stephen shriek at gmx.co.uk
Wed Dec 19 01:24:17 CET 2001


Fernando Pérez <fperez528 at yahoo.com> wrote in message news:<9vc581$g0h$1 at peabody.colorado.edu>...
> Paul Rubin wrote:
> 
> > Fernando Pérez <fperez528 at yahoo.com> writes:
> >> For some bizarre reason, redhat 7.2 includes two versions of pyhton with
> >> 1.5 being the default.
> > 
> > The reason may be that some of the red hat configuration scripts were
> > written under python 1.5, and 2.1 broke backwards compatibility.
> > In particular the "rand" module was renamed "random" and maybe changed.
> 
> good point. just yesterday I found out about that b/c I screwed up the 
> firewalling rules when installing a 7.2 box. Lo and behold, when I went 
> digging looking for the installer package (named anaconda), what I found was 
> a bunch of python scripts! The entire RedHat installer is a python system 
> (hence the name!). This was great, in a few minutes I was able to dig out 
> what the name of the underlying firewall configurator (lokkit) was and fixed 
> my mistake. 

I'm sat on a RedHat 7.2 box too and am very hesitant to upgrade to 
Python 2.x for fear of breaking a lot of the RedHat-distributed 
scripts, including the firewall.  The alternative seems to be to
install Python 2.1.1 without symlinking it to /usr/bin/python 
ie. Leave Python 1.5.2 the default Python and then use the hash-bang
to explicitly call python 2.x (#!/usr/bin/python2) in my scripts.
Is this right ?

On this note, I tried installing expat-1.1-4tummy.src.rpm and
python2-2.1.1-3.src.rpm (following the instructions to 'rebuild'
it, as per http://www.python.org/2.1.1/rpms.html)
but where does the rebuilt python get installed ? 

Afterwards, it claims the RPM is not installed 
$ rpm -q python*rpm
package python2-2.1.1-3.src.rpm is not installed

Thanks for any help,

Stephen



More information about the Python-list mailing list