Returns a plugin by name and raises ``gemstone.errors.PluginDoesNotExistError`` error if
        no plugin with such name exists.

        :param name: a string specifying a plugin name.
        :return: the corresponding plugin instance.
496400
def get_plugin(self, name):
        
        for plugin in self.plugins:
            if plugin.name == name:
                return plugin

        raise PluginDoesNotExistError("Plugin '{}' not found".format(name))
48178
def get_configure_by_name(self, name):
        """"""

        for elem in self.configures:
            if elem.name == name:
                return elem
        return None
1227149
def _plugin_name(self, path):
        ""
        base = os.path.basename(path)
        name, ext = os.path.splitext(base)
        return name
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
437949
def get_field_by_name(self, name):
        

        for f in self.fields:
            if f.get_name() == name:
                return f
        return None
1277367
def plugin(name):
    
    env.host_string = lib.get_env_host_string()
    plug = lib.import_plugin(name)
    lib.print_header("Executing plugin '{0}' on "
                     "{1}".format(name, env.host_string))
    node = lib.get_node(env.host_string)
    if node == {'run_list': []}:
        node['name'] = env.host_string
    plug.execute(node)
    print("Finished executing plugin")
1011261
def get(self, name: str, default: Any = None) -> np.ndarray:
		
		if name in self:
			return self[name]
		else:
			return default
990729
def load_plugin(plugin_name):
    
    plugin_cls = plugin_map.get(plugin_name, None)
    if not plugin_cls:
        try:
            plugin_module_name, plugin_cls_name = plugin_name.split(":")
            plugin_module = import_module(plugin_module_name)
            plugin_cls = getattr(plugin_module, plugin_cls_name)
        except ValueError:
            raise click.ClickException(
                '"{}" is not a valid plugin path'.format(plugin_name)
            )
        except ImportError:
            raise click.ClickException(
                '"{}" does not name a Python module'.format(
                    plugin_module_name
                )
            )
        except AttributeError:
            raise click.ClickException(
                'Module "{}" does not contain the class "{}"'.format(
                    plugin_module_name, plugin_cls_name
                )
            )
    return plugin_cls
338557
def define_plugin_entry(name, module_name):
    
    if isinstance(name, tuple):
        entry, name = name
    else:
        entry = name
    return '%s = %s:%s' % (entry, module_name, name)
968233
def _register_external_service(self, plugin_name, plugin_instance):
        
        for attr in plugin_instance.get_external_services().keys():
            if attr in self._external_services:
                raise PluginException("External service with name {} already exists! Unable to add "
                                      "services from plugin {}.".format(attr, plugin_name))
            self._external_services[attr] = plugin_instance.get_external_services().get(attr)
478472
def create(name, options = {})
            last_slash = name.rindex("/")
            category = name[0 ... last_slash]
            plugin = name[last_slash .. -1]

            map = @plugins[category]
            if not map
                raise "Plugin category #{category} does not exist"
            elsif not map.has_key? plugin
                raise "Plugin #{plugin} does not exist in category #{category}"
            else
                map[plugin].new(options)
            end
        end
130525
def activate(name):
    
    if name in plugins:
        plugins[name].activate()
    else:
        raise Exception("plugin {} not found".format(name))
1228940
def find( cls, name ):
        
        if ( cls._plugins is None ):
            cls._plugins = {}
            
        return cls._plugins.get(nativestring(name))
880288
def get_plugin_class(self, typ):
        
        if typ in self._class:
            return self._class[typ]

        # try to import by same name
        try:
            importlib.import_module("%s.%s" % (self.namespace, typ))
            if typ in self._class:
                return self._class[typ]

        except ImportError as e:
            self.log.debug("ImportError " + str(e))

        raise ValueError("unknown plugin '%s'" % typ)
1372835
def get(self, name=None):
        
        return self.__app.recipes.get(name, self._plugin)
212361
def select(self, name):
    '''
    
    '''
    return PluginSet(self.group, name, [
      plug for plug in self.plugins if plug.name == name])
29531
def find_plugin(self, name):
        """"""
        suffix = ".py"
        if not self.class_name:
            suffix = ""
        for i in self._get_paths():
            path = os.path.join(i, "%s%s" % (name, suffix))
            if os.path.exists(path):
                return path
        return None