Unleash The Power of C++ In Python



One of the main Python aspects is to have a clear syntax and be an
easy-to-understand language, which compared to others like C++
(depending of the kindness of the developer) can make a huge difference.

Not only the readability is in play, having a dynamically typed
and interpreted language improves the development workflow.

This improvement comes with a cost, performance. In most of the cases, a raw comparison of simple routines will leave Python behind, but there is a partial solution to this problem, connecting a powerful performant C++ library with the simplicity of Python.

In this talk, we will go through the process of generating language bindings to allow you to take any amazing C or C++ project and bring it to Python land. We will briefly discuss one of the many success stories, and we will analyze how the Qt project managed to expose its whole framework to Python, with the help of a self-made binding generator called Shiboken.

After the talk, you will be able to decide which option is better for the
projects you have in mind, and with a bit of luck you will be responsible of exposing the next popular C++ library that makes the life of us all Pythonistas easier.

EVENT:

EuroPython 2019

SPEAKER:

Cristián Maureira-Fredes

PUBLICATION PERMISSIONS:

Original video was published with the Creative Commons Attribution license (reuse allowed).

ATTRIBUTION CREDITS:

Original video source: https://www.youtube.com/watch?v=SUQYuA9AJT0

14 thoughts on “Unleash The Power of C++ In Python

  1. How come in many of these comparisons another world is left out: JIT' managed, compiled languages with static types like C# and Java. Personally for me, the best of both worlds. You get almost the speed of C, in most cases (depends), AND you have static type safety, and lots of the same convenience that Python has. C# especially, I find it just as easy and convenient as Python, but it has static types and compilation. I still like Python, but I find it the perfect compromise of being "more like C++" in some of the ways mentioned here. It isn't just Python or C++. Not sure why these comparisons always seem to ignore that middle ground that is used all over the place.

  2. I have been looking for right programming language to become pro in since past 10 years, which will make living(i.e coding) on earth worthwhile. I like C++ but it doesn't put the food on the table, jobs are for js, python, java. Managers don't care about it, they care about how quickly build it and the UI and average app efficiency or speed would be good. But programmer cares for the libs he is using, the coding rules of clean coding, efficiency of the code etc, which take time. Hence higher level language always takes away the top position. The day these stupid managers are out of the picture that day can be celebrated as Independence day for all the coders in the world and then we'll be able to see lower level languages rise.

  3. I have been looking for right programming language to become pro in since past 10 years, which will make living(i.e coding) on earth worthwhile. I like C++ but it doesn't put the food on the table, jobs are for js, python, java. Managers don't care about it, they care about how quickly build it and the UI and average app efficiency or speed would be good. But programmer cares for the libs he is using, the coding rules of clean coding, efficiency of the code etc, which take time. Hence higher level language always takes away the top position. The day these stupid managers are out of the picture that day can be celebrated as Independence day for all the coders in the world and then we'll be able to see lower level languages rise.

  4. Just having a shorter syntax doesn't make a language beautiful…. There's actual meaning of each syntax in C++ with no abstraction .. Thats what we (Computer Engineer / Enthusiast ) call it beautiful

  5. So how does this compare to Cython (NOT CPython)? Didn't see that in the comparison so far, but we have used it as an interface to bind together C++ Code and Python code in my Scientific computing course.

    Like some of the alternatives you mentioned it does not really generate a complete codeset

Leave a Reply

Your email address will not be published. Required fields are marked *