[Pythonmac-SIG] django webapp using CoreGraphics complains about "wrong architecture"

VanL van.lindberg at gmail.com
Wed Sep 16 19:54:39 CEST 2009


David Warde-Farley wrote:

> My best guess (as I've never poked around in the guts of PIL) is that 
> there is a pure Python version that is slow-as-molasses and then a sped 
> up C version which is used if possible (_imaging.so). PIL invoked from 
> Apache will thus probably use the slow-as-molasses version as the import 
> of _imaging will silently fail somewhere in the Python code but be 
> caught by an exception handler.

PIL is lazy. It will give you back an image object that will be filled 
in when you look inside it. Thus, the pure Python create image works, 
but the lazy hook bombs when you try to actually do something with the 
image.

Thanks,

Van



More information about the Pythonmac-SIG mailing list