parameters: (moduleOrReq)
return_statement: return _find_adapter(_provider_factories, loader)(module)
docstring: Return an IResourceProvider for the named module or requirement
docstring_summary: Return an IResourceProvider for the named module or requirement
docstring_tokens: Return an IResourceProvider for the named module or requirement
function: def get_provider(moduleOrReq):
      """Return an IResourceProvider for the named module or requirement"""
      if isinstance(moduleOrReq, Requirement):
          return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
      try:
          module = sys.modules[moduleOrReq]
      except KeyError:
          __import__(moduleOrReq)
          module = sys.modules[moduleOrReq]
      loader = getattr(module, '__loader__', None)
      return _find_adapter(_provider_factories, loader)(module)
function_tokens: def get_provider ( moduleOrReq ) : if isinstance ( moduleOrReq , Requirement ) : return working_set . find ( moduleOrReq ) or require ( str ( moduleOrReq ) ) [ 0 ] try : module = sys . modules [ moduleOrReq ] except KeyError : __import__ ( moduleOrReq ) module = sys . modules [ moduleOrReq ] loader = getattr ( module , '__loader__' , None ) return _find_adapter ( _provider_factories , loader ) ( module )