SWIG, STL & pickle

Ondrej Marsalek ondrej.marsalek at gmail.com
Tue May 1 12:19:42 EDT 2007


hello,

i have the following problem/question:

i have a c++ class i would like to wrap using swig, easy so far. i
want to be able to pickle it as well and i understand that i need to
implement the setstate and getstate methods to be able to do that. now
the tricky part - my c++ class uses stl vectors (and possibly other
stl containers). swig can handle that, except for the pickling. what
should i do to be able to pickle the whole c++ object? i am not sure i
would be able to dig into stl code and implement serialization for it
by hand.

thanks for any help.




More information about the Python-list mailing list