Dealing with multiple versions of packages...

Graham Dumpleton grahamd at dscpl.com.au
Thu Apr 22 06:42:21 EDT 2004


Chris.Barker at noaa.gov (Chris Barker) wrote in message news:<62c819a5.0404201235.c1649c5 at posting.google.com>...
> Hi all,
> 
> We've been having a discussion over on the wxPython-users mailing list
> about how to deal with multiple versions of wxPython. During the
> discussion it came up that this isn't a problem faced only by
> wxPython, but would have to be dealt with by virtually all packages.

Check out Pmw (pmw.sourceforge.net) for ideas. It stores stuff under a
root of Pmw, but then has separate directories under that for each version.
Ie., Pmw_1_1, Pmw_1_2, etc. The __init__.py in the root is then a special
lazy loader which by default uses the latest version, but you can specify
a specific version by using a setversion() method. Whatever version you
end up using, everything is still referenced as Pmw.SomeClass rather
than having to hard code the version everywhere.



More information about the Python-list mailing list