def run_discovery(entry_points_iter, cached=False):
 reg_cache = {}
 if cached:
  reg_cache = cache.registry_cache()
 discovery = QtWidgetDiscovery(cached_descriptions=reg_cache)
 registry = QtWidgetRegistry()
 discovery.found_category.connect(registry.register_category)
 discovery.found_widget.connect(registry.register_widget)
 discovery.run()
 if cached:
  cache.save_registry_cache(reg_cache)
 return registry

def run_discovery ( entry_points_iter , cached = False ) : reg_cache = { } if cached : reg_cache = cache . registry_cache ( ) discovery = QtWidgetDiscovery ( cached_descriptions = reg_cache ) registry = QtWidgetRegistry ( ) discovery . found_category . connect ( registry . register_category ) discovery . found_widget . connect ( registry . register_widget ) discovery . run ( ) if cached : cache . save_registry_cache ( reg_cache ) return registry
run the default widget discovery and return a :class:widgetregistry instance .