pint.utils.open_or_use
- pint.utils.open_or_use(f: str | bytes | Path | IO[Any], mode: str = 'r') Generator[IO[Any], None, None][source]
Open a filename or use an open file.
Specifically, if f is a string, try to use it as an argument to open. Otherwise just yield it. In particular anything that is not a subclass of
strwill be passed through untouched.