Or, an equally excellent answer would be "you still use swig? That's so outdated. Try Awesome McAwesomestein's Awesome C++ to Python Autowrap"