do not click

Meeting C++ 2023   |  Online   |  Training   |  Books   |  Survey   |  Job fair   |  Advertising   |  Jobposting   |  Login

Meeting C++ 2023 - Lets Talk: Extend and Embed Python with C++

Conference | Live Schedule | Talks | Get your ticket | Set your timezone

Books by Rainer Grimm

Concurrency with Modern C++

Rainer Grimm

Track B on-site

Python is very communicative. On the one hand, it is very easy to call C++ functionality from Python (extend), and on the other hand, Python can be used directly from a C++ runtime (embed). Extending allows you to offload performance-critical parts of your program to C++ or to overcome the GIL (global interpreter lock) in Python. Thanks to embedding a Python interpreter in your C++ application, the C++ application has a scripting interface.

I show how you can include existing shared libraries and extend Python with your own shared libraries thanks to the ctypes module. Furthermore, I introduce the frameworks SWIG and pybind11 to almost automate this process.
Finally, I go into the mirror image process: How to embed Python in a C++ application.

Please login to comment

Copyright Meetingcpp GmbH Imprint Piwik Opt out Privacy Policy