Accessing a PyInstances dictionary from C++

Martin v. Löwis martin at v.loewis.de
Fri Jan 3 03:47:01 EST 2003


"Lloyd" <NOSPAM at fusion.net.nz> writes:

> I'm trying to call a method on a python object from C++. I have a PyInstance
> but can't for figure out how to obtain the dictionary from the instance so
> that I can call the method on the object.

I suggest that you skip those steps, and use PyObject_CallMethod
directly. If you really need the bound method object, use
PyObject_GetAttrString.

Regards,
Martin





More information about the Python-list mailing list