[Zope] arghhghghg Zope and PIL.

Andy Smith andy@ictibroker.com
Mon, 7 Jun 1999 10:41:28 -0400


I got stung with this as well when I was making a product that used PIL (and
I think it was probably me that caused aforementioned 'rant' ;) ). The
solution opted for at the time was to make PIL a python package, with its
own directory and __init__.py file. Look at the 'PIL friendly Poll product'
in the contributed code section.

The only catch is that the __init__.py file has to explicitly import any
decoders you intend using.

Cheers,

Andy.



Here's a snippet from the README..

This package requires PIL to be compiled and installed such that PIL can be
imported by the Poll product. So far it has been run on both linux and win32
installations of PIL.

PIL must exist somewhere in Zope's import path. A good place to do this
would be in the systems 'site-packages' directory.

PIL is availabe at http://www.pythonware.com

Because of a naming confict between Zope and PIL (ImageFile and others), it
is
 necessary to 'packagize' PIL. There is an __init__.py file included with
this product which should be placed in the PIL directory. This allows PIL to
be imported as a package and therefore allows modules to be uniquely
qualified (using PIL.ImageFile etc.)

> -----Original Message-----
> From: anthony@nextTelecom.com [mailto:anthony@nextTelecom.com]On Behalf
> Of Anthony Baxter
> Sent: Monday, June 07, 1999 9:25 AM
> To: zope@zope.org
> Subject: [Zope] arghhghghg Zope and PIL.
>
>
> I seem to recall /F had a bit of a rant about this one earlier, but
> I'll just add my two bits worth: Can the ImageFile module _please_
> be renamed. Yes, this breaks code, but the alternative is that PIL
> cannot be used with Zope. PIL predates Zope, so probably has precedence.
>
> If someone can suggest an alternative, I'm all ears...
>
>
> It's _really_ annoying to get bitten by this - _most_ stuff sort of
> works, and it's a complete pain to debug what's going on.
>
> Anthony
> --
> Anthony Baxter     <anthony@interlink.com.au>
> It's never too late to have a happy childhood.
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>