18 #ifndef PYTHON_UTILS_HH_
19 #define PYTHON_UTILS_HH_
27 #include <pybind11/embed.h>
83 <<
"Python Error: " << EI_PythonMessage::val <<
"\n");
97 static void initialize();
103 static pybind11::module_ load_module_from_file(
const std::string& fname);
109 static pybind11::module_ load_module_from_string(
const std::string& module_name,
const std::string& func_name,
const std::string& source_string);
119 static pybind11::module_ load_module_by_name(
const std::string& module_name);
123 static void throw_error(
const pybind11::error_already_set &ex);
127 static void add_sys_path(
const std::string &path);
Global macros to enhance readability and debugging, general constants.
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
void throw_error(spirit_namespace::position_iterator< Iter_type > i, const std::string &reason)
class __attribute__((visibility("default"))) PythonLoader