Read and return contents of *resource* within *package* as str.
(anchor, *path_names, encoding=_MISSING, errors='strict')
| 26 | |
| 27 | |
| 28 | def read_text(anchor, *path_names, encoding=_MISSING, errors='strict'): |
| 29 | """Read and return contents of *resource* within *package* as str.""" |
| 30 | encoding = _get_encoding_arg(path_names, encoding) |
| 31 | resource = _get_resource(anchor, path_names) |
| 32 | return resource.read_text(encoding=encoding, errors=errors) |
| 33 | |
| 34 | |
| 35 | def path(anchor, *path_names): |
nothing calls this directly
no test coverage detected
searching dependent graphs…