PIL and py2exe Issues

Fredrik Lundh fredrik at pythonware.com
Thu Jun 5 01:54:13 EDT 2003


Kevin Dahlhausen wrote:

> Anyone come across the problem of PIL not being able to identify image
> files once it's compiled with py2exe?

google knows... ;-)

> Do I need to manually add some plugins to the setup or something?

PIL scans sys.path for plugins (*ImagePlugin files).  When running under
py2exe (or any other wrapper), you have to import them yourself.  Just
add import statements to your main program for all the formats you need:

    import JpegImagePlugin
    import PngImagePlugin
    import BmpImagePlugin
    import GifImagePlugin
    # etc

(to get a complete list, look in the PIL package directory)

</F>








More information about the Python-list mailing list