cartopy.io.fh_getter#

cartopy.io.fh_getter(fh, mode='r', needs_filename=False)[source]#

Convenience function for opening files.

Parameters:
  • fh – File handle, filename or (file handle, filename) tuple.

  • mode (optional) – Open mode. Defaults to “r”.

  • needs_filename (optional) – Defaults to False

Returns:

file handle, filename – Opened in the given mode.