I have a C ++ library that uses Boost.Serialization. I am creating Python bindings for this library using Boost.Python. Itβs clear enough how to make a pickle set for Boost.Python that uses Boost.Serialization (save to a string using Boost.Serialization and return that string to Python).
What I want is the opposite: with boost::python::object I want to have a serialize(...) function that will call the Python pickle.dumps() function and serialize the resulting string. (Imagine a std::vector<boost::python::object> . When I serialize this vector, Boost.Serialization will call the helper function serialize() .) Is this possible? Better yet, is it possible to use cPickle and workaround while giving control to the Python interpreter?
source share