pypore.i_o package

Module contents

pypore.i_o.get_reader_from_filename(filename)[source]

Returns an instance of an implementation of pypore.i_o.abstract_reader.AbstractReader based on the extension of filename.

Parameters:filename (string) – Filename to get the reader for.
Returns:An open reader of an implementation of pypore.i_o.abstract_reader.AbstractReader based on the extension of filename, for the following extensions.

If the file extension is not in the above list, None is returned.

Raise:Exception - this method opens a reader, which could throw an exception.
>>> reader = get_reader_from_filename('test.h5') # Returns an open DataFileReader
>>> data = reader.get_all_data()