Nick Maclaren wrote:
> Hmm.  The extensions documentation describes how to add instance
> members to a class (PyMemberDef), but I want to add a class member.
> Yes, this is constant for all instances of the class.
>
> Any pointers?

Add something like this to your PyMODINIT_FUNC after you have
initialized your type with PyType_Ready:

PyDictSetItemString(YourType.tp_dict, "attrname", attrvalue);

Ziga

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to