[Image-SIG] PIL modules with pickle?

W.T. Bridgman William.T.Bridgman.1 at gsfc.nasa.gov
Thu Jul 27 16:26:48 CEST 2006


I've got a python class that I want to pickle but it includes calls  
to some PIL modules.

The pickling process keeps failing with

pickle.PicklingError: Can't pickle <built-in method getsize of  
ImagingFont object at 0xd133818>: it's not found as __main__.getsize

Is there a way around this?  I've searched ASPN recipes, Google, and  
tried to search the Image-SIG archive for comprehensible examples.  I  
suspect something with __reduce__ or copy_reg may work examples I've  
found are far from clear.

Thanks,
Tom
--
Dr. William T."Tom" Bridgman               Scientific Visualization  
Studio
Global Science & Technology, Inc.          NASA/Goddard Space Flight  
Center
Email: William.T.Bridgman.1 at gsfc.nasa.gov  Code 610.3
Phone: 301-286-1346                        Greenbelt, MD 20771
FAX:   301-286-1634                        http://svs.gsfc.nasa.gov/



More information about the Image-SIG mailing list