Storing a C pointer in a Python class instance
pavlovevidence at gmail.com
Wed Sep 30 17:18:38 CEST 2009
On Sep 30, 5:24 am, "lallous" <lall... at lgwm.org> wrote:
> After using the PyCObject, I cannot pickle the class anymore.
> Any simple solution to this problem? (or resorting to __reduce__ is the only
You can't pickle a CObject, you'd have to create a custom type (one
that implements one of the pickling methods) for that. Or arrange for
whatever object contains the CObject to pack and unpack it manually.
Out of curiosity, what kind of data you storing in this CObject?
Maybe we can help you choose a better way to handle it at the C level.
More information about the Python-list