[EuroPython 2012] A Bingham - 4 JULY 2012 in "Track Ravioli"
Python has great support for interfacing with C/C++ code, and this has been used to great advantage by exposing many C/C++ libraries as Python modules. In this talk, I will reverse the equation. I will show you how you can - and why you might want to - build C++ APIs on top of Python modules and use them directly from your C++ programs. The topics will include: Conversion of types across the language boundary. Implementation of C++ idioms (e.g. the begin()/end() iterator API) on top of Python idioms. Python runtime management: initialization, module loading, etc. Working with the “impedance mismatches” between the languages (e.g. duck-typing vs. static typing) I will also discuss the reasons why C++ APIs on Python code represent a very useful and often powerful technique. The reasons range from simple pragmatism (you want to use an existing Python module in an existing C++ program) to productivity (writing Python code plus a C++ wrapper can be easier and faster than writing pure C++.) link - https://docs.google.com/presentation/d /1hx_59DMQm6ZlI3Jz-LX- DZ4m5LVLpGcSlk1Dq1PiELI/edit