[Zope] Zope/PIL collision - what to do?

Jens Vagelpohl jens@digicool.com
Fri, 27 Oct 2000 00:15:58 -0400


try something like....

import PIL

image = PIL.Image.open('foo.png')

that way you do not have two names "Image" colliding in the names Zope sees

jens



----

Jens Vagelpohl        jens@digicool.com
Software Engineer     www.digicool.com
Digital Creations     (888) 344-4332

Got Zope?

----



on 10/26/00 18:44, Anselm Lingnau at lingnau@tm.informatik.uni-frankfurt.de
wrote:

> I'm trying to use the Python Imaging Library in an external Python
> method to modify some images dynamically. However, when I try to load
> an image:
> 
> import Image    # from PIL - refers to PIL ImageFile module
> image = Image.open("foo.png")
> 
> the method crashes because the Image module sees the Zope ğImageFileĞ
> module instead of the one from PIL. The Zope module, of course, does
> something completely different from the other one. This is on Debian
> GNU/Linux 2.2 with Zope 2.2.2 (taken from the ğunstableĞ distribution
> and re-built -- the Zope in Debian 2.2 is older) and the PIL 1.0.1
> from the distribution.
> 
> How do I get around this?
> 
> Anselm