From: kishor s. <kis...@gm...> - 2016-04-27 19:12:58
|
Hi CXX Users, I am using PyCXX to write extension classes. I am trying to pickle the extension object using cPickle. cPickle break as __module__ attribute is not on the objects e.g. In [1]: import example range object created 0x196b290 range object destroyed 0x196b290 In [2]: example.range.__name__ Out[2]: 'range' In [3]: example.range.__doc__ Out[3]: 'range(start,stop,stride)' *In [4]: example.range.__module__* *In [5]: example.range.__module__ is None* *Out[5]: True* I tried debugging the code it seems to be passing correct module name to Py_InitModule4 function but it is not reflected in the python. Any help/pointers on how to fix? Thanks, Kishor Sharma |