Inheritance in extension types
Alex Martelli
aleax at aleax.it
Tue Sep 11 08:49:12 EDT 2001
"Boudewijn Rempt" <boud at rempt.xs4all.nl> wrote in message
news:9nkntp$4j$1 at news1.xs4all.nl...
...
> That is more or less what Phil has done with Qt - if C++ class B
> inherits C++ class A, you can create an instance of class B from Python
> and access the methods of A (if they have not been redefined in B).
> Take a look at sip to see how it's done:
> http://www.thekompany.com/projects/pykde/
An alternative to sip, particularly if you're really familiar
with C++ (and in particular with its awesomely powerful templates:
they use signature-based polymorphism, just like Python, and
thereby give C++ a fraction of Python's power!-), is Boost
Python, part of the superb Boost set of libraries. See
http://www.boost.org/ for more -- but you do need a decently
updated C++ compiler, such as VC++6 or a reasonably recent
version of gcc. If you and/or your compiler would rather
avoid templates, Boost is probably best avoided too:-).
Alex
More information about the Python-list
mailing list