Loading…
This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
View analytic
Tuesday, September 20 • 3:45pm - 4:15pm
Python & C++: the Beauty and the Beast, dancing together. Introduction to C++ python extensions and embedding Python in C++ Apps.

Log in to save this to your schedule and see who's attending!

C and C++ languages are the best for high performance, and probably have the largest quota among programming languages, implementing the backbone of all of the existing computing infrastructure, including those other programming languages. On the other hand, python usage is also very popular and growing, with its amazing simplicity, and it is being adopted as the generic language for learning and many other tasks ranging from BigData and systems to web sites. Python is also being widely used in development and systems automation “devops”, being the language of choice for many scripting tasks (build systems as SCons are written in python) or as glue between subsystems.

This talk will introduce how both C++ and Python languages can work together. As many of the methods to write python extensions typically use a raw C API, we’ll focus on how to use C++ in such extensions, and the C++ code itself.

First, I’ll briefly present the canonical python C API, and how different aspects of C++ (as Exceptions) have to be handled. Then, I will describe and compare a couple of pure C++ ways to build extensions: the reference Boost.Python and the modern, but very active and popular successor, Pybind11.

Finally, I will conclude explaining how to embed a python interpreter in a C++ application. This allows C++ programs to introduce a powerful and known language to let the users define extensions or configuration of our C++ application without requiring them to build anything.

All presented examples will be complete and working, with build scripts included, in a public repository.

Speakers
avatar for Diego Rodriguez-Losada

Diego Rodriguez-Losada

SW Engineer, Freelance
Diego's passions are robotics and SW development. He has developed many years in C and C++ in the Industrial, Robotics and AI fields. He was also a University (tenure track) professor till 2012, when he quit academia to try to build a C/C++ dependency manager, co-founded startup biicode, since then mostly developing in Python. Now he is working as freelance and having fun with conan.io.


Tuesday September 20, 2016 3:45pm - 4:15pm
Vanity (Room 404) Meydenbauer Center

Attendees (184)