Is it possible to pickle (using cPickle) an enum that has been exposed with Boost.Python? I have successfully pickled other objects using the first method described here, but none of that seems to apply for an enum type, and the objects don't seem to be pickleable by default.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Not as they are in the module. I am given to understand that this is SUPPOSED to be possible, but the way the enum_ statement works prevents this.
You can work around this on the python side. Somewhere (probably in a __init__.py file) do something like this:
This will make everything pickle just fine.