Support unavailable
Please try again later

Supercharging C++ Code with Embedded Python

by Michael Fötsch for EuroPython 2012

The talk is now available on my web site.

Imagine you have this great C++ library, let’s say it’s a game engine. It’s all data-driven, of course, so users just need to push a few buttons to build an endless variety of games by mixing and matching the building blocks that the library provides.

But one day (usually the day after you released the library), users hit a roadblock. They need some functionality that your engine doesn’t provide. If only they could extend your engine with their own “if” statements, their own “for” loops, and maybe a few arithmetic expressions.

That’s the situation we found ourselves in at SPIELO, so we decided to drop a Python interpreter into our existing C++ game engine and let users write their own plug-ins and scripts.

In this talk, I will…

  • Give an overview of extending and embedding Python
  • Show you how you can add Python scripting to your own C++ programs
  • Share some insights about the lessons we learned at SPIELO
  • Explain how Python plug-ins also improve any kind of GUI or help with automated testing


Do you have some questions on this talk? Leave a comment to the speaker!

New comment

60 minutes (inc Q&A)

Tagged as

embedding game-development case-study
Our Sponsors
Python Experts
SSL Matrix
Wanna sponsor?