Subclassing ExtensionClasses in C?

James Henstridge james+news at daa.com.au
Mon Feb 7 21:54:01 EST 2000


I send this message a few weeks ago, but didn't get any response.  Does
anyone know if ExtensionClass is capable of doing this?  Here is the
original message:


I have a small question about using ExtensionClass with my python
module.

It was suggested to me recently that I may want to look at rewriting my
python extension pygtk to use ExtensionClasses (to increase speed,
decrease mem usage, and a few other benefits).  For those who have not
used pygtk, it is a wrapper for the GTK GUI widget set (see
www.gtk.org).

If I switched over to using ExtensionClass, I would want to create a
heirachy of ExtensionClasses implemented in C as wrappers for the
various widgets.  Looking through the documentation for ExtensionClass,
it has examples of how to create classes in C that can be subclassed in
python, but it does not seem to have any examples of how to write one
extension class that subclasses another extension class.

I assume that this is possible, but I haven't seen any examples.  Is it
possible to do with the public ExtensionClass API, or is it a little
more difficult.  If anyone can help with this, I would appreciate it.

Thanks in advance,

James Henstridge.



More information about the Python-list mailing list