Reusable code for exposing C++ code to Python, with Boost Python