<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Joel,
<p>This is indeed a tricky area. I recommend you start by reading this
paper, several times:
<p> <A HREF="http://www.python.org/workshops/1995-12/papers/ahlstrom1.html">http://www.python.org/workshops/1995-12/papers/ahlstrom1.html</A>
<p>Then to see this implemented in a real extension, take a look at WPY
itself, <a href="http://alldunn.com/wxPython">wxPython</a> or <a href="ftp://ftp.cfdrc.com/pub/FOX/FXPy-0.99.42.tar.gz">FXPy</a>
(and probably others?).
<p>Good luck,
<p>Lyle
<p>Joel Davis wrote:
<blockquote TYPE=CITE>I am trying to wrap a bunch of c++ classes so that
virtual methods in
<br>derived classes can be written in python, and still callable from c++,
<p>SWIG and friends seem to be one-way, they let you subclass a C++ class
<br>in python via shadow classes or fancy extention types, but the
<br>subclasses behavior only shows up on the python side. I am trying to
add
<br>the ability to mix python derived classes into a large c++ application.
<p>I guess what I'm asking is, the ORA Python book says (p626), "it's also
<br>possible to route C++ virtual method calls back down to methods in
a
<br>python subclass, but it may require a stub-class on the C++ side of
the
<br>interface, too (this is left as a Exercise to the Reader)." Are there
<br>any tools to help make this easier, or any good examples of this?
<p>thanks,
<br>joel
<br>--
<br>----------------------------------------------------------------
<br>
joeld@anisci.com</blockquote>
</html>