def global_registry(entry_point_group='_default'):
 global __GLOBAL_REGISTRY
 if (__GLOBAL_REGISTRY.get(entry_point_group) is None):
  log.debug("'global_registry()' - running widget discovery.")
  if (entry_point_group == '_default'):
   from ..config import widgets_entry_points
   entry_points_iter = widgets_entry_points()
  else:
   entry_points_iter = entry_point_group
  reg = WidgetRegistry()
  disc = discovery.WidgetDiscovery(reg)
  disc.run(entry_points_iter)
  log.info("'global_registry()' discovery finished.")
  __GLOBAL_REGISTRY[entry_point_group] = reg
 return __GLOBAL_REGISTRY[entry_point_group]

def global_registry ( entry_point_group = '_default' ) : global __GLOBAL_REGISTRY if ( __GLOBAL_REGISTRY . get ( entry_point_group ) is None ) : log . debug ( "'global_registry()' - running widget discovery." ) if ( entry_point_group == '_default' ) : from . . config import widgets_entry_points entry_points_iter = widgets_entry_points ( ) else : entry_points_iter = entry_point_group reg = WidgetRegistry ( ) disc = discovery . WidgetDiscovery ( reg ) disc . run ( entry_points_iter ) log . info ( "'global_registry()' discovery finished." ) __GLOBAL_REGISTRY [ entry_point_group ] = reg return __GLOBAL_REGISTRY [ entry_point_group ]
return a global widgetregistry instance for the entry point group .