Python Imaging Library import problems
Hi, I'm a new Zoper. I've spent most of my day evangelizing at Phil Greenspun's Database Backed Web Sites course and the rest of the day trying to get the Python Imaging Library working as an external method. Has anyone been able to do this? I'd like to be able to have an external method that can create thumbnail images for Zope Image objects by using their data attribute. It would be real handy for a site I'm designing now. My first problem was that whenever I tried referencing PIL's Image module from an external method, I would get the Zope image class instead. After clearing that up, I got error messages about PIL being unable to decode file types, even though the exact same code works fine when run from the command line. Eventually, I reduced my test external method so all it does is import PIL and load an image file from the file system (yes, I used binary mode). PIL still complains about not being able to decode the file. I suspect that the problem may be that PIL imports submodules on startup and caches them, but I'm too exhausted to pursue this any further. If anyone has gotten PIL to work with Zope, please let me know. Thanks so much fellow Zopers, Mike Salib -- "One World, One Web, One Program" - Microsoft Promotional Ad "Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler "There is no greater illusion than fear, no greater wrong than preparing to defend yourself, no greater misfortune than having an enemy. Whoever can see through all fear will always be safe." --Lao-Tsu in the Tao Te Ching
participants (1)
-
Mike Salib