def load_plugins(self):
        """Load plugins from entry point(s)."""
        from pkg_resources import iter_entry_points
        seen = set()
        for entry_point in self.entry_points:
            for ep in iter_entry_points(entry_point):
                if ep.name in seen:
                    continue
                seen.add(ep.name)
                try:
                    plugincls = ep.load()
                except Exception as exc:
                    # never let a plugin load kill us
                    warn("Unable to load plugin %s: %s" % (ep, exc),
                         RuntimeWarning)
                    continue
                plugin = plugincls()
                self.add_plugin(plugin)
        super(EntryPointPluginManager, self).load_plugins()
def load_plugins ( self ) : from pkg_resources import iter_entry_points seen = set ( ) for entry_point in self . entry_points : for ep in iter_entry_points ( entry_point ) : if ep . name in seen : continue seen . add ( ep . name ) try : plugincls = ep . load ( ) except Exception as exc : warn ( "Unable to load plugin %s: %s" % ( ep , exc ) , RuntimeWarning ) continue plugin = plugincls ( ) self . add_plugin ( plugin ) super ( EntryPointPluginManager , self ) . load_plugins ( )
Load plugins from entry point(s).