(plugin_mapping)
| 96 | |
| 97 | |
| 98 | def _import_plugins(plugin_mapping): |
| 99 | plugins = [] |
| 100 | for name, path in plugin_mapping.items(): |
| 101 | log.debug("Importing plugin %s: %s", name, path) |
| 102 | if '.' not in path: |
| 103 | plugins.append(__import__(path)) |
| 104 | else: |
| 105 | package, module = path.rsplit('.', 1) |
| 106 | module = __import__(path, fromlist=[module]) |
| 107 | plugins.append(module) |
| 108 | return plugins |
| 109 | |
| 110 | |
| 111 | def _add_plugin_path_to_sys_path(plugin_path): |