def get_plugins(phase=None, interface=None, category=None, name=None, min_api=None):
 def matches(plugin):
  if ((phase is not None) and (phase not in phase_methods)):
   raise ValueError((u'Unknown phase %s' % phase))
  if (phase and (phase not in plugin.phase_handlers)):
   return False
  if (interface and (interface not in plugin.interfaces)):
   return False
  if (category and (not (category == plugin.category))):
   return False
  if ((name is not None) and (name != plugin.name)):
   return False
  if ((min_api is not None) and (plugin.api_ver < min_api)):
   return False
  return True
 return filter(matches, iter(plugins.values()))

def get_plugins ( phase = None , interface = None , category = None , name = None , min_api = None ) : def matches ( plugin ) : if ( ( phase is not None ) and ( phase not in phase_methods ) ) : raise ValueError ( ( u'Unknown phase %s' % phase ) ) if ( phase and ( phase not in plugin . phase_handlers ) ) : return False if ( interface and ( interface not in plugin . interfaces ) ) : return False if ( category and ( not ( category == plugin . category ) ) ) : return False if ( ( name is not None ) and ( name != plugin . name ) ) : return False if ( ( min_api is not None ) and ( plugin . api_ver < min_api ) ) : return False return True return filter ( matches , iter ( plugins . values ( ) ) )
helper to get a direct interface to _plugins .