Hello all I am trying to call the method of python object. But I dont know how to transfer the pointer of the python object into c++ .
the C++ method to receive python object pointer : static PyObject* ReceivePythonPointer(PyObject* self, PyObject* args) { PyObject* temp=NULL ; //translate into C++ pointer, but Failed, the temp is null if ( PyArg_ParseTuple(args, "0", &tmp) ) { //tmp } } to call c method in the following python script: class foo: def __init__(self): ReceivePythonPointer(self) def Func(self): print 'Func' f1 foo Is it impossible to get the pointer of C object when ReceviePythonPointer is Called? I want to get the pointer of "f1" object, Can you give me some advice ? Best wishes. -- http://mail.python.org/mailman/listinfo/python-list