Native file format

Does anybody understand why CXX extensions don’t pickle?
I have the same problem with my own CXX extensions, which I make with SWIG.
On the other hand, FORTRAN extensions using f2py pickle fine!


From: “John Hunter” <jdh2358@…287…>

Subject: Re: [Matplotlib-users] Native file format
To: “Edin Salkovic” <edin.salkovic@…287…>
Cc: Jan Strube <
curiousjan@…287…>,, Eric Firing

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2/7/07, Edin Salkovic <edin.salkovic@…287…> wrote:

Why can’t mpl’s figures be pickled?

The main thing is we need to add pickle support for all of mpl’s extension code

In earlier attempts people got stuck with trying to pickle the
CXX extension code, which was causing some problems, but these

problems may be fixed in more recent versions of CXX. Todd Miller was
the last person to look at this in some detail, I think.

Other hinderances may come from the GUI layer, since figures store
pointers to their canvases which in some cases come from GUI extension

code that may not support pickling. But we can fairly easy decouple
the figure from the canvas at pickle time and deal with pure mpl,
numpy and python objects. The main work is to add pickle
serialization to the mpl extension code.