On 2018-07-10 03:55 PM, Danny C wrote:
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.

Have you read the docs (http://boostorg.github.io/python/doc/html/tutorial/tutorial/exposing.html#tutorial.exposing.class_virtual_functions) ?

Stefan

--

      ...ich hab' noch einen Koffer in Berlin...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to