adding standard types to new type

2005-08-11 Thread kman3048
I've created a new type using the API and want to add not only methods (which is easy with PyMethodDef structure) but also insert several Python standard type variables. Is there some equivalent to PyModule_AddObject - just working on the new type instead Module? Or do I have to add a dictionary

Re: API class creation

2005-08-05 Thread kman3048
Thanks, that helped a lot. Anybody who wants to attempt the same might find the source code tree of Python i.e. file src/Modules/cdmodule.c helpful. --Matt Daniel Dittmar wrote: kman3048 wrote: Hello, as a relative newcomer to Python API programming I've got a problem: To extend

API class creation

2005-08-04 Thread kman3048
Hello, as a relative newcomer to Python API programming I've got a problem: To extend Python: - there is an API C call to create a module - there is also a API C call to create a method - there is an API C call to create a Class instance Now, I need to create a Class and fill it with Methods