5 #ifndef __pinocchio_python_utils_namespace_hpp__
6 #define __pinocchio_python_utils_namespace_hpp__
8 #include <boost/python.hpp>
26 bp::scope current_scope;
27 std::string current_scope_name(bp::extract<const char*>(current_scope.attr(
"__name__")));
28 std::string complete_submodule_name = current_scope_name +
"." + submodule_name;
30 bp::object submodule(bp::borrowed(PyImport_AddModule(complete_submodule_name.c_str())));
31 current_scope.attr(submodule_name.c_str()) = submodule;
38 #endif // ifndef __pinocchio_python_utils_namespace_hpp__