Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void reporting_manager::initialize_module_paths()
- {
- common::script::python::scoped_gil_acquire unlocker;
- bp::object sys_module = bp::import("sys");
- for (uint32_t i(0); i < config_.module_dir_.size(); ++i) {
- fs::path module_path = fs::absolute(config_.module_dir_[i]);
- bp::str module_directory = module_path.generic_string().c_str();
- sys_module.attr("path").attr("insert")(i, module_directory);
- log::debug("reporting_manager", "Added Python module path '%s'"
- , module_path.generic_string());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement