Returns plugin or plugin point class from given ``plugin_name`` string.

    Example of ``plugin_name``::

        'my_app.MyPlugin'
499483
def get_plugin_from_string(plugin_name):
    
    modulename, classname = plugin_name.rsplit('.', 1)
    module = import_module(modulename)
    return getattr(module, classname)
1140586
def find_filter_class(filtername):
    """"""
    if filtername in FILTERS:
        return FILTERS[filtername]
    for name, cls in find_plugin_filters():
        if name == filtername:
            return cls
    return None
879225
def get_plugin(self, method):
        
        all_plugins = []
        for entry_point in pkg_resources.iter_entry_points('yolk.plugins'):
            plugin_obj = entry_point.load()
            plugin = plugin_obj()
            plugin.configure(self.options, None)
            if plugin.enabled:
                if not hasattr(plugin, method):
                    self.logger.warn("Error: plugin has no method: %s" % method)
                    plugin = None
                else:
                    all_plugins.append(plugin)
        return all_plugins
138966
def get(self, name=None, plugin=None):
        
        if plugin is not None:
            if name is None:
                shared_objects_list = {}
                for key in self._shared_objects.keys():
                    if self._shared_objects[key].plugin == plugin:
                        shared_objects_list[key] = self._shared_objects[key]
                return shared_objects_list
            else:
                if name in self._shared_objects.keys():
                    if self._shared_objects[name].plugin == plugin:
                        return self._shared_objects[name]
                    else:
                        return None
                else:
                    return None
        else:
            if name is None:
                return self._shared_objects
            else:
                if name in self._shared_objects.keys():
                    return self._shared_objects[name]
                else:
                    return None
496400
def get_plugin(self, name):
        
        for plugin in self.plugins:
            if plugin.name == name:
                return plugin

        raise PluginDoesNotExistError("Plugin '{}' not found".format(name))
1231678
def _load_plugin_class(menu, name):
    
    group = 'custodia.{}'.format(menu)
    eps = list(pkg_resources.iter_entry_points(group, name))
    if len(eps) > 1:
        raise ValueError(
            "Multiple entry points for {} {}: {}".format(menu, name, eps))
    elif len(eps) == 1:
        # backwards compatibility with old setuptools
        ep = eps[0]
        if hasattr(ep, 'resolve'):
            return ep.resolve()
        else:
            return ep.load(require=False)
    elif '.' in name:
        # fall back to old style dotted name
        module, classname = name.rsplit('.', 1)
        m = importlib.import_module(module)
        return getattr(m, classname)
    else:
        raise ValueError("{}: {} not found".format(menu, name))
919552
def get_plugin_spec(self, name):
        """"""
        l_name = name.lower()
        for spec in self.plugins:
            name = spec.get('name', spec.get('klass', spec.module))
            if name.lower() == l_name:
                return spec
        raise KeyError(name)
1039796
def unload_plug_in(self, name):
        
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        self._call("unloadPlugIn",
                     in_p=[name])
918876
def get_plugin_module(self, plugin_type, plugin_name):
        """"""
        plugin = self._get_plugin_type(plugin_type)
        return plugin.get_plugin_module(plugin_name)
1148310
def get(self, name_or_klass):
        
        if not isinstance(name_or_klass, str):
            name_or_klass = name_or_klass.__name__
        return self._extensions[name_or_klass]
1198692
function getPluginName(plugin) {
	if (isPluginFunction(plugin)) return null;

	return _.isString(plugin) ? plugin : _.head(plugin);
}
550207
def _get_plugin_parser(self, plugin_obj):
        

        prog_name = 'focus ' + plugin_obj.command
        desc = (plugin_obj.__doc__ or '').strip()

        parser = FocusArgParser(prog=prog_name, description=desc)
        plugin_obj.setup_parser(parser)

        return parser
714224
def get_class(self, name):
        
        for i in self.get_classes():
            if i.get_name() == name:
                return i
        return None
1319378
def get_plugin_class_for_command(self, scan_command: PluginScanCommand) -> Type[Plugin]:
        
        return self._scan_command_classes_to_plugin_classes[scan_command.__class__]
409740
def plugin(name):
        
        cls = XChartRenderer._plugins.get(name)
        if cls:
            renderer = cls()
            renderer.setName(name)
            return renderer
        return None
298203
def get_plugin(previous_plugin_info)
      if previous_plugin_info[:type] == :platform
        if PLUGINS.has_key?(previous_plugin_info[:name])
          @log.debug("Using #{previous_plugin_info[:name]} mapping")
          return PLUGINS[previous_plugin_info[:name]]
        else
          @log.debug("This plugin does not know what mappings to choose, so will assume default values where user values are not provided.")
        end
      end
      @log.debug("Using default domain mappings.")
      PLUGINS[:default]
    end
859906
def load_sub_plugins_from_str(cls, plugins_str):
        
        plugin_classes = {}
        if plugins_str:
            for plugin_name in plugins_str.split(":"):
                pc = load_plugin(plugin_name, MONITOR_DEFAULT_PLUGIN_MODULE)
                plugin_classes[plugin_name] = pc
        return plugin_classes