Introduction to C++ python extensions and embedding Python in C++ Apps
summary
Shows working C++ extension code, build scripts and a GitHub repo that currently builds on Windows + Visual Studio with Python 2.7, demonstrating raw Python C API plus two C++ approaches: Boost.Python (more manual, custom STL converters, explicit refcounting) and Pybind11 (automatic STL mapping, std::function callbacks). Explains reference-count bugs, how callbacks require GIL scope acquire, and embedding a Python interpreter in a C++ app; all examples compile and exercises run.
AI-written summary · about
chapters (12)
- 0:00Why mix Python and C++
- 1:29Extension approaches
- 2:57Python C API basics
- 5:28Boost.Python and pybind11
- 7:28Advanced binding techniques
- 10:20Mapping STL containers
- 13:54Memory management
- 16:45Callback mechanisms
- 18:35Concurrency and the GIL
- 21:17Library comparison
- 23:08Embedding Python in C++
- 25:06Q&A session
related talks
29mC++ ♥ Python: from modules to hybrid applications
01h 01mExtend and Embed Python with C++
25mHow to bring your C++ project to Python land
29mThe Art of Extending Python with other languages
01h 02mWriting Python Bindings for C++ Libraries: Easy-to-use Performance
01h 51m'Extending and Wrapping C and C++ with Python' - Diego Rodriguez-Losada [ ACCU 2016 ]
49mHow to build Python-C++ libraries
31mThe secret to enhancing Qt for Python applications
