def open(path, mode="r"): """ Open a file. Returns an instance of the format handler. path String path name. mode String mode. Since only mode='r' (read-only) is currently used, it is optional. """ f = None if path[-3:] == ".nc": cd = CdunifFormatHandler.open(path, mode=mode) f = AcmeMultiFormatHandler(cd.file) else: f = AcmeMultiFormatHandler(None) return f
def open(path, mode='r'): """ Open a file. Returns an instance of the format handler. path String path name. mode String mode. Since only mode='r' (read-only) is currently used, it is optional. """ f = None if (path[-3:] == ".nc"): cd = CdunifFormatHandler.open(path, mode=mode) f = AcmeMultiFormatHandler(cd.file) else: f = AcmeMultiFormatHandler(None) return f