[reportlab-users] Reportlab/PIL and py2exe

Andy Robinson reportlab-users@reportlab.com
Fri, 5 Mar 2004 01:34:53 -0000


> I've been struggling to get Reportlab to work with py2exe.
> Specifically the problem is that after a .PY file is 
> "frozen" into .EXE any calls to Canvas.drawInlineImage
> fail because ImageReader doesn't have the necessary
> plugins to allow PIL.Image to determine the type of
> image that is being placed on the Canvas.

I don't know enough about this.  Is the problem with
PIL's "lazy loading" and needing to help py2exe
detect which PIL plugins should be included in the distro?
If so I'd argue it's a PIL problem.  If not, can you
explain why this works in the file system and not in
an EXE?


> Is my problem a common one or is it too obscure to 
> matter (I've encountered it a number of times in
> other applications that I've attempted to run through
> py2exe)?  Is there a better way to accomplish what
> I have "hacked"?
It's obscure, but we are very concerned with packing
whole apps in compact distributions, so it's certainly
worth getting to the bottom of it...

- Andy