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!
Mark
···
From: “John Hunter” <jdh2358@…287…>
Subject: Re: [Matplotlib-users] Native file format
To: “Edin Salkovic” <edin.salkovic@…287…>
Cc: Jan Strube <
curiousjan@…287…>,
matplotlib-users@lists.sourceforge.net, Eric Firing
<efiring@…202…Message-ID:
<88e473830702070721tdccc72fr6b76a187ef3c0086@…288…>
Content-Type: text/plain; charset=ISO-8859-1; format=flowedOn 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
http://docs.python.org/lib/node321.html
In earlier attempts people got stuck with trying to pickle the
CXX extension code, which was causing some problems, but theseproblems 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 extensioncode 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.