[C++-sig] How to derive a python class from a C++ base abstract class [Boost.python]

Danny C dannyc22192 at gmail.com
Tue Jul 10 15:55:21 EDT 2018


Hi,

I am trying to build a hybrid system for exposing my C++ library to python
and some other languages.

Use case:
Expose certain C++ abstract classes to be extended in python. A different
exposed concrete class instance uses the methods from extended classes as
callbacks


Q1: I want to derive a python class whose base class is an ABSTRACT class
written in C++. How do I do this. I've read many threads and similar
questions but most of them are concerning SWIG. I want to use boost.python
for my purpose. Any help on this is really appreciated.

Q2: How do I implement callbacks from C++  to python i.e. my callback
function is written in python.

Thanks
iowax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20180711/6e0c104c/attachment.html>


More information about the Cplusplus-sig mailing list