do not click

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

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

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

Books by Rainer Grimm

C++20
Concurrency with Modern C++

Rainer Grimm

On Day 3 at 11:40 in Track B (Opal Room)

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