[Tutor] Re: [Tutor]Upgrading python, Gadfly and Zope

Jeff Shannon jeff@ccvcorp.com
Fri, 05 Jul 2002 11:09:44 -0700


Paul Hartley wrote:

> I have python 2.0 and need to upgrade to 2.2 (according to the
> version of Gadfly I just downloaded), do I uninstall 2.0 first or
> just install 2.2 on top of 2.0?

That's entirely up to you.  Both versions of Python can coexist quite
happily -- they will install to different directories, and you can use
either one at your option.  The only conflict will be, which one is
the default version -- in other words, which one starts up when you
type '$ python'.  Typically, this will be whichever version you
installed last, but that can be changed.  (Let us know if you need to
know how to change it -- and be sure to mention what OS you're using.)



>  Zope has its own version of python, so now I have two versions, can
> I upgrade the version in the zope directory too or do I need to
> update the whole of zope (I know this is  azope question, but it is
> python related!)

AFAIK (though I'm mostly unfamiliar with Zope), the reason that Zope
comes with its own version is because it may not work properly with a
different version.  By including its own version, it doesn't have to
worry that you upgrading your main version will break Zope.  You
shouldn't try to upgrade Zope's python without upgrading your entire
Zope installation.


> Finally, can I use the version of Gadfly that came with zope from my
> 'normal' python applications? I think I must be able to. If so I
> might not install the Gadfly version I downloaded, just use the one
> in the Zope products directory.

There's no guarantee that that version of Gadfly will work with a
different version of Python than the one which came with Zope, but it
might -- and if your main Python installation *is* the same version,
then it definately will.  You can accomplish this by either copying
the package directory to your main Python's site-packages (though if
you're doing this, it's accomplishing much the same thing as
installing the separate Gadfly that you downloaded, and you'd be
better off just using that), or you can add the existing Gadfly
directory to Python's sys.path (either by editing sitecustomize.py, or
by using .pth files).

However, I'd think that (unless disk space is a serious concern, or
you run into problems with the two versions of Gadfly not
interoperating properly) you're probably better off using the newer,
downloaded Gadfly rather than reusing the Zope version of Gadfly.

Jeff Shannon
Technician/Programmer
Credit International