MCPcopy Index your code
hub / github.com/python/cpython / open_text

Function open_text

Lib/importlib/resources/_functional.py:16–20  ·  view source on GitHub ↗

Open for text reading the *resource* within *package*.

(anchor, *path_names, encoding=_MISSING, errors='strict')

Source from the content-addressed store, hash-verified

14
15
16def open_text(anchor, *path_names, encoding=_MISSING, errors='strict'):
17 """Open for text reading the *resource* within *package*."""
18 encoding = _get_encoding_arg(path_names, encoding)
19 resource = _get_resource(anchor, path_names)
20 return resource.open('r', encoding=encoding, errors=errors)
21
22
23def read_binary(anchor, *path_names):

Callers

nothing calls this directly

Calls 3

_get_encoding_argFunction · 0.85
_get_resourceFunction · 0.85
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…