SciFiReaders.auto_reader.AutoReader

SciFiReaders.auto_reader.AutoReader#

class SciFiReaders.auto_reader.AutoReader(file_path, *args, **kwargs)[source]#

Bases: Reader

Selects the concrete SciFiReaders reader for a file and delegates read() to it.

Parameters:

file_path (str) – Path to the file that needs to be read

self._input_file_path#

Path to the file that will be read

Type:

str

Notes

  • This method will check to make sure that the provided file_path is indeed a string and a valid file path.

  • Consider calling can_read() within __init__() for validating the provided file

Raises:

FileNotFoundError –

Methods

can_read

read

select

Return (selected reader class, list of all matching reader classes).

static select(file_path)[source]#

Return (selected reader class, list of all matching reader classes).