BasicTools.IO.ReaderBase module

Base reader object from which all the readers of BasicTools inherit

BasicTools.IO.ReaderBase.CheckIntegrity()[source]
class BasicTools.IO.ReaderBase.ReaderBase(fileName=None)[source]

Bases: BaseOutputObject

ReaderBase class

EndReading()[source]
GetFilePointer()[source]
Peek(length=1)[source]

Read a length number of chars without advancing the file

PeekLine(withError=False)[source]

Read a line without advancing

ReadCleanLine(withError=False)[source]
SetBinary(binary=True)[source]

Sets the binary status of the file to read

Parameters:

binary (bool, optional) – if True, sets the file to read as binary, by default True

SetFileName(fileName)[source]

Sets the name of file to read

Parameters:

fileName (str) – file name to set

SetReadFromPipe()[source]
SetStringToRead(string)[source]

Sets data to be read as a string instead of a file

Parameters:

string (str) – data to be read

StartReading()[source]
rawread(cpt, withError=False)[source]
readData(cpt, datatype)[source]
readFloats32(cpt, finalShape=None)[source]
readFloats64(cpt, finalShape=None)[source]
readInt32()[source]
readInt64()[source]
reshapeData(data, finalShape=None)[source]
seek(cpt)[source]