C++ and Python

Joel Davis joeld at anisci.com
Thu Jun 24 17:54:24 EDT 1999


I am trying to wrap a bunch of c++ classes so that virtual methods in
derived classes can be written in python, and still callable from c++,

SWIG and friends seem to be one-way, they let you subclass a C++ class
in python via shadow classes or fancy extention types, but the
subclasses behavior only shows up on the python side. I am trying to add
the ability to mix python derived classes into a large c++ application.

I guess what I'm asking is, the ORA Python book says (p626), "it's also
possible to route C++ virtual method calls back down to methods in a
python subclass, but it may require a stub-class on the C++ side of the
interface, too (this is left as a Exercise to the Reader)." Are there
any tools to help make this easier, or any good examples of this?

thanks,
joel
--
----------------------------------------------------------------
                                                joeld at anisci.com






More information about the Python-list mailing list