[C++-sig] Supplying a Python base class when wrapping a C++ class...

Rocketman@JSC snemeth at houston.rr.com
Thu Apr 19 04:09:27 CEST 2007

Has anyone figured out how to do this?

Alex Mohr-2 wrote:
> I'd like to wrap a C++ class and have the generated python wrapper class 
> derive from a Python class.
> I know I can use bases<> to have my wrapped class derive from the class 
> objects associated with the C++ types I specify in bases<>, but in this 
> instance, I want to derive my wrapper class from a Python class that was 
> not generated by boost.python.
>  From looking at the code, it seems like it would be some work to add 
> this capability.  (Is anyone working on something like this?)
> As a workaround, does anyone know a way that I could perhaps hack this 
> in after the Python class is created?  That is, can I change the Python 
> base classes of a Python class at runtime?
> Thanks,
> Alex
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig

View this message in context: http://www.nabble.com/-C%2B%2B-sig--Supplying-a-Python-base-class-when-wrapping-a-C%2B%2B-class...-tf2554848.html#a10070530
Sent from the Python - c++-sig mailing list archive at Nabble.com.

More information about the Cplusplus-sig mailing list