embed python: how do you call a class's attribute that is located inside another class...
David Ang
davidang at info.com.ph
Fri May 30 12:42:25 EDT 2003
Anyone? pls help
thanks.
davidang at info.com.ph (David Ang) wrote in message news:<8b1c146b.0305290553.5ef4b32f at posting.google.com>...
> Hello,
>
> ie,
>
> class A
> self.list = []
> def somefunc
> b = self.B()
> ...
> list.append(b)
>
> Class B
> self.someValue = ""
>
>
> how do you exactly call B's self.someValue in C?
>
> i tried doing this but fail...
>
> PyObject *pObj = PyMapping_GetItemString(pDict, "someInstance");
> PyObject_GetAttrString(pObj, "list[0].someValue")
> // returns -1
>
> many thanks.
>
> David
More information about the Python-list
mailing list