11 #include <boost/python.hpp>
13 #include <framework/utilities/RegisterPythonModule.h>
14 #include <framework/logging/Logger.h>
22 if (PyImport_AppendInittab(
const_cast<char*
>(name), initFunc) == -1) {
23 B2FATAL(
"REGISTER_PYTHON_MODULE(" << name <<
") failed.");
27 if (!Py_IsInitialized()) {
28 B2FATAL(
"REGISTER_PYTHON_MODULE_AUTOIMPORT(" << name <<
"): Python is not initialized!");
31 std::string importString =
"import ";
33 if (PyRun_SimpleString(importString.c_str()) == -1) {
34 B2FATAL(
"'import " << name <<
"' failed.");