Get entry points to load any plugins installed. 
        The build process should create an "entry_points.json" file
        with all of the data from the installed entry points.
332362
def _default_plugins(self):
        
        plugins = {}
        try:
            with open('entry_points.json') as f:
                entry_points = json.load(f)
            for ep, obj in entry_points.items():
                plugins[ep] = []
                for name, src in obj.items():
                    plugins[ep].append(Plugin(name=name, source=src))
        except Exception as e:
            print("Failed to load entry points {}".format(e))
        return plugins
835998
def load_plugins(group='metrics.plugin.10'):
    
    # on using entrypoints:
    # http://stackoverflow.com/questions/774824/explain-python-entry-points
    file_processors = []
    build_processors = []
    for ep in pkg_resources.iter_entry_points(group, name=None):
        log.debug('loading \'%s\'', ep)
        plugin = ep.load()  # load the plugin
        if hasattr(plugin, 'get_file_processors'):
            file_processors.extend(plugin.get_file_processors())
        if hasattr(plugin, 'get_build_processors'):
            build_processors.extend(plugin.get_build_processors())
    return file_processors, build_processors
880983
def load_plugins(self, plugins):
        

        def instantiate(plugin):
            return plugin() if inspect.isclass(plugin) else plugin

        loaded_plugins = []
        plugins_seen = []

        # Iterate over plugins in reverse to permit users to override default
        # plugin config
        for plugin in reversed(plugins):
            if not is_plugin(plugin) or plugin.name in plugins_seen:
                continue
            # Build the plugins list in reverse to restore original order
            loaded_plugins.insert(0, instantiate(plugin))
            plugins_seen.append(plugin.name)

        return loaded_plugins
719736
def load_entry_point_group_templates(self, entry_point_group_templates):
        """"""
        result = []
        for ep in iter_entry_points(group=entry_point_group_templates):
            with self.app.app_context():
                for template_dir in ep.load()():
                    result.append(self.register_templates(template_dir))
        return result
472716
def load_all_plugins(self):
        """"""

        # Go through the existing python files in the plugin directory
        self.plugin_path = os.path.realpath(self.plugin_dir)
        sys.path.append(self.plugin_dir)
        print '<<< Plugin Manager >>>'
        for f in [os.path.join(self.plugin_dir, child) for child in os.listdir(self.plugin_dir)]:

            # Skip certain files
            if '.DS_Store' in f or '__init__.py' in f: 
                continue

            # Add the plugin
            self.add_plugin(f)
635066
def load_plugins():
        
        plugin_cls = {}
        for entry_point in pkg_resources.iter_entry_points('docker_interface.plugins'):
            cls = entry_point.load()
            assert cls.COMMANDS is not None, \
                "plugin '%s' does not define its commands" % entry_point.name
            assert cls.ORDER is not None, \
                "plugin '%s' does not define its priority" % entry_point.name
            plugin_cls[entry_point.name] = cls
        return plugin_cls
324095
def load_entry_point_group(self, entry_point_group):
        
        for ep in pkg_resources.iter_entry_points(group=entry_point_group):
            admin_ep = dict(ep.load())
            keys = tuple(
                k in admin_ep for k in ('model', 'modelview', 'view_class'))

            if keys == (False, False, True):
                self.register_view(
                    admin_ep.pop('view_class'),
                    *admin_ep.pop('args', []),
                    **admin_ep.pop('kwargs', {})
                )
            elif keys == (True, True, False):
                warnings.warn(
                    'Usage of model and modelview kwargs are deprecated in '
                    'favor of view_class, args and kwargs.',
                    PendingDeprecationWarning
                )
                self.register_view(
                    admin_ep.pop('modelview'),
                    admin_ep.pop('model'),
                    admin_ep.pop('session', db.session),
                    **admin_ep
                )
            else:
                raise Exception(
                    'Admin entry point dictionary must contain '
                    'either "view_class" OR "model" and "modelview" keys.')
996065
def load_builtin_plugins() -> int:
    
    plugin_dir = os.path.join(os.path.dirname(__file__), 'plugins')
    return load_plugins(plugin_dir, 'nonebot.plugins')
476186
def load(description, add_arguments_cb = lambda x: None, postprocess_conf_cb = lambda x: None):
        

        argparser = ArgumentParser(
            description = description,
            prefix_chars = '-+'
        )

        argparser.add_argument(
            '--version',
            dest = 'PRINT_VERSION',
            action = 'store_true',
            help = 'Print version and exit'
        )

        add_arguments_cb(argparser)

        # set up plugin argument argparser
        plugin_argparser = argparser.add_argument_group('Plugins')

        plugins = {}
        def load_plugin_group(group):
            """Load all plugins from the given plugin_group."""
            for entry_point in iter_entry_points(group = group):
                name = str(entry_point).split(' =',1)[0]
                plugin = entry_point.load()
                if isclass(plugin) \
                    and not plugin in Conf.SUPPORTED_PLUGIN_INTERFACES \
                    and any([
                        issubclass(plugin, supported_plugin_interface)
                        for supported_plugin_interface in Conf.SUPPORTED_PLUGIN_INTERFACES
                    ]):

                    plugin_argparser.add_argument(
                        '+{}'.format(name),
                        dest = 'PLUGIN_{}'.format(name),
                        type = str,
                        nargs = '?',
                        default = DEFAULT,
                        metavar = 'args'.format(name),
                        help = make_argparse_help_safe(
                            call_plugin(
                                plugin,
                                'help'
                            )
                        )
                    )

                    # register plugin
                    plugins[name] = plugin
                else:
                    warning('Plugin not supported: {}'.format(name))

        load_plugin_group(Conf.PLUGIN_GROUP_BASE)
        if Conf.LOAD_PLUGINS:
            load_plugin_group(Conf.PLUGIN_GROUP)

        conf = vars(
            argparser.parse_args([
                v if i == 0 or v[0] == '+' or Conf.ARGS[i-1][0] != '+'
                else b32encode(v.encode()).decode()
                for i, v in enumerate(Conf.ARGS)
            ])
        )

        postprocess_conf_cb(conf)

        # apply configuration
        Conf.set(conf)

        if Conf.PRINT_VERSION:
            print(
                'pdml2flow version {}'.format(
                    Conf.VERSION
                ),
                file = Conf.OUT
            )
            sys.exit(0)

        # initialize plugins
        Conf.PLUGINS = []
        for conf_name, args in conf.items():
            if conf_name.startswith('PLUGIN_') and args != DEFAULT:
                plugin_name = conf_name[7:]
                Conf.PLUGINS.append(
                    # instantiate plugin
                    plugins[plugin_name](
                        *split(
                            b32decode(args.encode()).decode() if args is not None else ''
                        )
                    )
                )
909690
function getEntryPoints(globPattern) {
    var testFiles = glob.sync(globPattern);
    var entryPoints = {};
    testFiles.forEach(function(file) {
        entryPoints[file.replace(/\.js$/, '')] = './' + file;
    });
    return entryPoints;
}
577487
def load_installed_plugins(self):
        
        result = []
        plugin_dirs = [d for d in os.listdir(self.plugin_path) if os.path.isdir(os.path.join(self.plugin_path, d))]
        settings = constants.SETTINGS

        for d in plugin_dirs:
            if d == "__pycache__":
                continue
            try:
                class_module = self.load_plugin(d)
                plugin = class_module()
                plugin.plugin_path = os.path.join(self.plugin_path, plugin.name)
                plugin.load_description()
                plugin.enabled = settings.value(plugin.name, type=bool) if plugin.name in settings.allKeys() else False
                result.append(plugin)
            except ImportError as e:
                logger.warning("Could not load plugin {0} ({1})".format(d, e))
                continue

        return result
639879
def _load_plugins(self):
        '''
        
        '''
        plugins = self.settings['PLUGINS']

        self.plugins_dict = {}
        for key in plugins:
            # skip loading the plugin if its value is None
            if plugins[key] is None:
                continue
            # valid plugin, import and setup
            self.logger.debug("Trying to load plugin {cls}".format(cls=key))
            the_class = self._import_class(key)
            instance = the_class()
            instance._set_logger(self.logger)
            if not self.unit_test:
                instance.setup(self.settings)
            the_schema = None
            with open(self.settings['PLUGIN_DIR'] + instance.schema) as the_file:
                the_schema = json.load(the_file)

            mini = {}
            mini['instance'] = instance
            mini['schema'] = the_schema
            self.logger.debug("Successfully loaded plugin {cls}".format(cls=key))
            self.plugins_dict[plugins[key]] = mini

        self.plugins_dict = OrderedDict(sorted(list(self.plugins_dict.items()),
                                               key=lambda t: t[0]))
68967
def print_plugin_list(plugins: Dict[str, pkg_resources.EntryPoint]):
    
    for trigger, entry_point in plugins.items():
        try:
            plugin_class = entry_point.load()
            version = str(plugin_class._info.version)
            print(
                f"{trigger} (ok)\n"
                f"    {version}"
            )
        except Exception:
            print(
                f"{trigger} (failed)"
            )
1104120
function listEntryPoints(pkg) {
  debug(`listing entrypoints for ${pkg.name}`);
  if (!pkg.name) {
    throw new Error('cannot read dependencies for unnamed package');
  }
  let paths = [];

  if (pkg.main) {
    debug(`found main path for ${pkg.name}`);
    paths.push(pkg.main);
  }

  if (pkg.bin) {
    debug(`found bin entry(s) for ${pkg.name}`);
    paths = paths.concat(values(pkg.bin));
  }

  if (pkg.browser) {
    debug(`found browser entry(s) for ${pkg.name}`);
    paths = paths.concat(values(pkg.browser).filter((p) => p && !p.startsWith('@')));
  }

  debug(paths);

  return paths
    .map((p) => path.resolve('packages', 'node_modules', pkg.name, p));
}
432553
def register_plugins():
    """"""
    if pkg_resources:  # pragma: no cover
        for ep in pkg_resources.iter_entry_points('slam_plugins'):
            plugin = ep.load()

            # add any init options to the main init command
            if hasattr(plugin, 'init') and hasattr(plugin.init, '_arguments'):
                for arg in plugin.init._arguments:
                    init.parser.add_argument(*arg[0], **arg[1])
                init._arguments += plugin.init._arguments
                init._argnames += plugin.init._argnames

            plugins[ep.name] = plugin
723695
def _loader(app, init_func, entry_points=None, modules=None):
    
    if entry_points:
        for entry_point in entry_points:
            for ep in pkg_resources.iter_entry_points(entry_point):
                try:
                    init_func(ep.load())
                except Exception:
                    app.logger.error(
                        'Failed to initialize entry point: {0}'.format(ep))
                    raise
    if modules:
        for m in modules:
            try:
                init_func(m)
            except Exception:
                app.logger.error('Failed to initialize module: {0}'.format(m))
                raise
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()