pypore.i_o package¶
Submodules¶
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. - ‘.h5’ extension: returns an instance of pypore.i_o.data_file_reader.DataFileReader.
- ‘.log’ extension: returns pypore.i_o.chimera_reader.ChimeraReader.
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()