embed python: how do you call a class's attribute that is located inside another class...

martin z pxtl at hotmail.com
Fri May 30 11:12:10 EDT 2003


> PyObject *pObj = PyMapping_GetItemString(pDict, "someInstance");
> PyObject_GetAttrString(pObj, "list[0].someValue")

I'm new to embedding as well, but I'd assume you'd have to do that one part
at a time - call getAttrString("list") first, then go from there.






More information about the Python-list mailing list