Pdef python generator and python bindings