Yah! Finally, I got the thing to work. Here is how I did it.
/* import the module that holds the base class */
PyObject *base_module = PyImport_ImportModule("module_name");
if (!base_module) return;
/* get a pointer to the base class */
PyObject *base_class = PyMapping_GetItemString(
harold fellermann wrote:
> ...
> This gives me a pointer to the class I want to use as base class.
> Does anyone know how to assign this to the extension class? I tried
> to build a tuple (BaseClass,) and assign it (after the respective
> PyType_Ready call) ...
I think this is your problem -- call
> "harold fellermann" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Hi all,
>
> I once read that it is possible to use a python base class for a C
> extension class.
On 14.06.2005, at 09:29, Grigoris Tsolakidis wrote:
> There was good article of how to do this on DDJ home page
There was good article of how to do this on DDJ home page www.ddj.com
"harold fellermann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi all,
I once read that it is possible to use a python base class for a C
extension class. To be precise, I want to achieve the following
behavior