def register_backends(base_name, base_path):
 modules = load_modules(base_name, base_path)
 mod_for = {}
 for module in modules:
  if hasattr(module, 'PROVIDER'):
   provider_name = module.PROVIDER
   if (provider_name == 'generic'):
    for (p_name, p) in providers.iteritems():
     p_type = p.get('type', None)
     if ((p_type == 'generic') and (p_name not in mod_for)):
      mod_for[p_name] = module
   else:
    mod_for[provider_name] = module
 return mod_for

def register_backends ( base_name , base_path ) : modules = load_modules ( base_name , base_path ) mod_for = { } for module in modules : if hasattr ( module , 'PROVIDER' ) : provider_name = module . PROVIDER if ( provider_name == 'generic' ) : for ( p_name , p ) in providers . iteritems ( ) : p_type = p . get ( 'type' , None ) if ( ( p_type == 'generic' ) and ( p_name not in mod_for ) ) : mod_for [ p_name ] = module else : mod_for [ provider_name ] = module return mod_for
dynamically loads all packages contained within thread backends module .