Load and register installed gcdt plugins.
429919
def get_plugin_versions(group='gcdt10'):
    
    versions = {}
    for ep in pkg_resources.iter_entry_points(group, name=None):
        versions[ep.dist.project_name] = ep.dist.version

    return versions
145308
def load_plugins(self):
        
        try:
            from pkg_resources import iter_entry_points
        except ImportError:
            return
        for ep in iter_entry_points(group="custodian.%s" % self.plugin_type):
            f = ep.load()
            f()
1238516
def load_plugins(self):
        ''' 
        '''
        self._dbg("Loading plugins")
        if not self.active_plugins:
            self._dbg("No plugins specified in conf file")
            return  # nothing to load

        for plugin_path in self.active_plugins:
            self._dbg("Importing {}".format(plugin_path))

            if self.debug is True:
                # this makes the plugin fail with stack trace in debug mode
                cls = import_string(plugin_path)
            else:
                # otherwise we log the exception and carry on
                try:
                    cls = import_string(plugin_path)
                except ImportError as error:
                    logging.exception("Problem importing {} - {}".format(
                        plugin_path, error)
                    )

            plugin_config = self.config.get(cls.__name__, {})
            plugin = cls(slack_client=self.slack_client, plugin_config=plugin_config)  # instatiate!
            self.bot_plugins.append(plugin)
            self._dbg("Plugin registered: {}".format(plugin))
1329954
public function loadRegistries()
    {
        $registries = $this->registryFactory->getDefaultRegistries();

        foreach ($registries as $registry) {
            $this->addRegistry($registry);
        }
    }
462275
def install(ctx, services, delete_after_install=False):
    """"""
    logger.debug("running command %s (%s)", ctx.command.name, ctx.params,
                 extra={"command": ctx.command.name, "params": ctx.params})

    home = ctx.obj["HOME"]
    services_path = os.path.join(home, SERVICES)

    installed_all_plugins = True
    for service in services:
        try:
            plugin_utils.install_plugin(service, SERVICE, services_path, register_service)
        except exceptions.PluginAlreadyInstalled as exc:
            click.echo(exc)
            installed_all_plugins = False

    if not installed_all_plugins:
        raise ctx.exit(errno.EEXIST)
878850
def LoadPlugins(cls):
        """"""

        if cls.PLUGINS_LOADED:
            return

        reg = ComponentRegistry()
        for _, record in reg.load_extensions('iotile.update_record'):
            cls.RegisterRecordType(record)

        cls.PLUGINS_LOADED = True
396591
def register():
    """"""
    if not plim:
        logger.warning('`slim` failed to load dependency `plim`. '
                       '`slim` plugin not loaded.')
        return
    if not mako:
        logger.warning('`slim` failed to load dependency `mako`. '
                       '`slim` plugin not loaded.')
        return
    if not bs:
        logger.warning('`slim` failed to load dependency `BeautifulSoup4`. '
                       '`slim` plugin not loaded.')
        return
    if not minify:
        logger.warning('`slim` failed to load dependency `htmlmin`. '
                       '`slim` plugin not loaded.')
        return

    signals.get_writer.connect(get_writer)
710409
def load_modules(self, args):
        """"""

        # Init the plugins dict
        # Active plugins dictionnary
        self._plugins = collections.defaultdict(dict)
        # Load the plugins
        self.load_plugins(args=args)

        # Init the export modules dict
        # Active exporters dictionnary
        self._exports = collections.defaultdict(dict)
        # All available exporters dictionnary
        self._exports_all = collections.defaultdict(dict)
        # Load the export modules
        self.load_exports(args=args)

        # Restoring system path
        sys.path = sys_path
405322
def register_plugin_module(mod):
    """"""
    for k, v in load_plugins_from_module(mod).items():
        if k:
            if isinstance(k, (list, tuple)):
                k = k[0]
            global_registry[k] = v
149068
def load_default_run_plugins(self):
        
        for plugin_name, plugin_class in default_plugins.items():
            if issubclass(plugin_class, RunPluginBase):
                try:
                    self.register_run_plugins(plugin_name, plugin_class())
                except PluginException as error:
                    self.logger.debug(error)
                    continue
1081372
def load_plugins_dir(path, category=None, overwrite=False):
    
    # get potential plugin python files
    if hasattr(path, 'glob'):
        pypaths = path.glob('*.py')
    else:
        pypaths = glob.glob(os.path.join(path, '*.py'))

    load_errors = []
    for pypath in pypaths:
        # use uuid to ensure no conflicts in name space
        mod_name = str(uuid.uuid4())
        try:
            if hasattr(pypath, 'resolve'):
                # Make the path absolute, resolving any symlinks
                pypath = pypath.resolve()

            with warnings.catch_warnings(record=True):
                warnings.filterwarnings("ignore", category=ImportWarning)

                # for MockPaths
                if hasattr(pypath, 'maketemp'):
                    with pypath.maketemp() as f:
                        module = load_source(mod_name, f.name)
                else:
                    module = load_source(mod_name, str(pypath))

        except Exception as err:
            load_errors.append((str(pypath), 'Load Error: {}'.format(err)))
            continue

        # only get classes that are local to the module
        class_members = inspect.getmembers(module, inspect.isclass)
        classes = [klass for klass_name, klass in class_members if
                   klass.__module__ == mod_name]
        load_errors += load_plugin_classes(classes, category, overwrite)

    return load_errors
41293
private void moveDownloadedPlugins() {
    if (fs.getDownloadedPluginsDir().exists()) {
      for (File sourceFile : listJarFiles(fs.getDownloadedPluginsDir())) {
        overrideAndRegisterPlugin(sourceFile);
      }
    }
  }
1247148
def cli(env, account_id, content_url):
    """"""

    manager = SoftLayer.CDNManager(env.client)
    manager.load_content(account_id, content_url)
1215578
def register_plugins(cls, plugins):
        '''
        
        '''
        for model in plugins:
            cls.register_plugin(model, plugins[model])
996065
def load_builtin_plugins() -> int:
    
    plugin_dir = os.path.join(os.path.dirname(__file__), 'plugins')
    return load_plugins(plugin_dir, 'nonebot.plugins')
915605
protected function load_installed_plugins() {
        global $DB, $CFG;

        if ($this->installedplugins) {
            return;
        }

        if (empty($CFG->version)) {
            // Nothing installed yet.
            $this->installedplugins = array();
            return;
        }

        $cache = cache::make('core', 'plugin_manager');
        $installed = $cache->get('installed');

        if (is_array($installed)) {
            $this->installedplugins = $installed;
            return;
        }

        $this->installedplugins = array();

        $versions = $DB->get_records('config_plugins', array('name'=>'version'));
        foreach ($versions as $version) {
            $parts = explode('_', $version->plugin, 2);
            if (!isset($parts[1])) {
                // Invalid component, there must be at least one "_".
                continue;
            }
            // Do not verify here if plugin type and name are valid.
            $this->installedplugins[$parts[0]][$parts[1]] = $version->value;
        }

        foreach ($this->installedplugins as $key => $value) {
            ksort($this->installedplugins[$key]);
        }

        $cache->set('installed', $this->installedplugins);
    }
691879
def register_plugin(self, name):
        """"""
        logger.info("Registering plugin: " + name)
        module = importlib.import_module(name)
        module.register_plugin(self)