safe_read_text

safe_read_text(path: str | Path | TextIO, *, encoding: str | None = None, newline: str | None = None) str[source]

Read text from a file.