When the words "Python", "C++", "extension" and "module" appear in the same sentence, it's usually because someone is talking about a Python application which uses a C++ extension module, maybe for performance reasons.
What if, instead, you want to extend a C++ application by writing Python modules? It turns out that's actually possible, by using the Python/C APIs to embed a Python interpreter in your application. But it's not very well documented.
Come with me on a journey into the wonderful world of sub-interpreters, thread states, reference counting and irritating conflicts between global objects that expect to exist only once.
Along the way we'll battle unexpected deadlocks, untangle contradictory documentation, and find that there are some things that cannot be safely killed.
By the end of this adventure, you will have learned more than you ever wanted to know about pieces of the Python interpreter you never knew existed.
Tim spends most of his time working for SUSE, hacking on Ceph and related technologies. He has spoken about high availability and distributed storage at several previous LCAs. In his spare time he wrangles pigs, chickens, sheep and ducks, and was declared by one colleague "teammate most likely to survive the zombie apocalypse".