0

I have a multithreaded C++ library that currently already has the ability of calling Python scripts from the inside via the Python C API. However, I would like to also add an outside Python wrapper to this C++ library to be able to use it as a module, once again with the C API.

Is it possible to do this Python->C->Python chain, or will things like the GIL create issues for this?

Roland Smith
  • 42,427
  • 3
  • 64
  • 94
Doktor Schrott
  • 616
  • 1
  • 7
  • 14
  • Check last paragraph [here](https://docs.python.org/3/extending/extending.html#thin-ice). – Olvin Roght Jan 20 '20 at 20:23
  • Calling C from Python is relatively easy with `ctypes`. For calling C++ you will probably need something like [pybind11](https://github.com/pybind/pybind11). – Roland Smith Jan 20 '20 at 21:09

0 Answers0