18 #ifndef PYTHON_UTILS_HH_
19 #define PYTHON_UTILS_HH_
26 #include <pybind11/pybind11.h>
83 <<
"Python Error: " << EI_PythonMessage::val <<
"\n");
109 static pybind11::module_
load_module_from_string(
const std::string& module_name,
const std::string& func_name,
const std::string& source_string);
123 static void throw_error(
const pybind11::error_already_set &ex);
DECLARE_EXCEPTION(ExcPythonError,<< "Python Error: "<< EI_PythonMessage::val<< "\n")
static pybind11::module_ load_module_from_string(const std::string &module_name, const std::string &func_name, const std::string &source_string)
static void throw_error(const pybind11::error_already_set &ex)
TYPEDEF_ERR_INFO(EI_PythonMessage, std::string)
static std::vector< std::string > get_python_path()
static pybind11::module_ load_module_by_name(const std::string &module_name)
static pybind11::module_ load_module_from_file(const std::string &fname)
static void add_sys_path(const std::string &path)
Global macros to enhance readability and debugging, general constants.