Accessing class members from C

"Martin v. Löwis" martin at v.loewis.de
Mon Sep 1 04:31:18 EDT 2003


disgracelands wrote:

> Basically i have the python class object as a C
> pointer 

You mean, you have an instance object?

> and i want to access one of the class members, somevar, 

And you want to access an instance attribute?

I recommend to use PyObject_[Get|Set]Attr[String] (this would
actually work for class objects and class members as well).

Regards,
Martin





More information about the Python-list mailing list