making python scripts backwards compatible

Ville Vainio vvainio at tp.spt.fi
Mon May 6 07:24:20 EDT 2002


joost_jacob at hotmail.com (J.Jacob) wrote in message news:<13285ea2.0205041128.51eda313 at posting.google.com>...

> <rant>
> At least until Red Hat upgrades their @#$%^&! default python
> installation on all those computers that are going to run
> their OS.  Every brand new computer today that is having

I usually put '#!/usr/bin/env python2' on the start of the scripts -
and manually create the 'python2' symlink on other platforms the
script is supposed to be run on (and figure out something else for
win32). It seems to be reasonable, assuming that python2.x won't break
compatibility with previous 2.* versions. Modules are not that much a
problem - the python that installs a module is the one that will use
it.

Let's just hope Red Hat fixes their python scripts for 8.x versions so
that they can upgrade the default python more frequently. Not that
there is something wrong with the present state - all the pythons in
2.x series are quite usable, but 1.5.2 feels quite awkward these days
(no +=, list comprehension).

Perhaps OSen that require a specific version of python could use an
internal 'syspython' alias or something in that vein, allowing us to
use 'python' to point wherever we want?

-- Ville



More information about the Python-list mailing list