def __iter__(cls, *instanceargs):
        """
        Lets you iterate over instances of all plugins which are not marked as
        'inactive'. If there are multiple aliases, the resulting plugin is only
        called once.
        """
        processed_aliases = set()
        for alias in sorted(cls.plugins, cmp=lambda x,y: cmp(x.lower(), y.lower())):
            if alias in processed_aliases:
                # duplicate alias
                continue

            try:
                instance = cls.create_instance(alias, *instanceargs)
                instance.alias = instance.standard_alias()
                yield(instance)
                for alias in instance.setting('aliases'):
                    processed_aliases.add(alias)

            except InactivePlugin:
                pass
def __iter__ ( cls , * instanceargs ) : processed_aliases = set ( ) for alias in sorted ( cls . plugins , cmp = lambda x , y : cmp ( x . lower ( ) , y . lower ( ) ) ) : if alias in processed_aliases : continue try : instance = cls . create_instance ( alias , * instanceargs ) instance . alias = instance . standard_alias ( ) yield ( instance ) for alias in instance . setting ( 'aliases' ) : processed_aliases . add ( alias ) except InactivePlugin : pass
Lets you iterate over instances of all plugins which are not marked as
        'inactive'. If there are multiple aliases, the resulting plugin is only
        called once.