locan.locan_io.locdata.utilities.open_path_or_file_like#

locan.locan_io.locdata.utilities.open_path_or_file_like(path_or_file_like, mode='r', encoding=None)[source]#

Provide open-file context from path_or_file_like input.

Parameters:
  • path_or_file_like (str | bytes | os.PathLike[Any] | int | SupportsRead[Any]) – Identifier for file

  • mode (str) – same as in open()

  • encoding (str | None) – same as in open()

Return type:

context for file object