def finder_for_path(path):
 result = None
 pkgutil.get_importer(path)
 loader = sys.path_importer_cache.get(path)
 finder = _finder_registry.get(type(loader))
 if finder:
  module = _dummy_module
  module.__file__ = os.path.join(path, u'')
  module.__loader__ = loader
  result = finder(module)
 return result

def finder_for_path ( path ) : result = None pkgutil . get_importer ( path ) loader = sys . path_importer_cache . get ( path ) finder = _finder_registry . get ( type ( loader ) ) if finder : module = _dummy_module module . __file__ = os . path . join ( path , u'' ) module . __loader__ = loader result = finder ( module ) return result
return a resource finder for a path .