pyart.io.prepare_for_read

pyart.io.prepare_for_read(filename)[source]

Return a file like object read for reading.

Open a file for reading in binary mode with transparent decompression of Gzip and BZip2 files. The resulting file-like object should be closed.

Parameters

filename (str or file-like object) – Filename or file-like object which will be opened. File-like objects will not be examined for compressed data.

Returns

file_like (file-like object) – File like object from which data can be read.