python streams the abstract iobase class is at the root of the stream io class hierarchy below this class are stream classes for unbuffered and buffered io and for text oriented io iobase this is the abstract base class for all / stream classes the class provides many abstract methods that subclasses will need to implement the iobase class (and its subclassesall support the iterator protocol this means that an iobase object (or an object of subclasscan iterate over the input data from the underling stream iobase also implements the context manager protocol and therefore it can be used with the with and with-as statements the iobase class defines core set of methods and attributes includingclose(flush and close the stream closed an attribute indicating whether the stream is closed flush(flush the write buffer of the stream if applicable readable(returns true if the stream can be read from readline(size=- return line from the stream if size is specified at most size bytes will be read readline(hint=- read list of lines if hint is specified then it is used to control the number of lines read seek(offset[whence]this method moves the current the stream position/pointer to the given offset the meaning of the offset depends on the whence parameter the default value for whence is seek_set seek_set or seek from the start of the stream (the default)offset must either be number returned by textiobase tell()or zero any other offset value produces undefined behaviour seek_cur or "seekto the current positionoffset must be zerowhich is no-operation (all other values are unsupportedseek_end or seek to the end of the streamoffset must be zero (all other values are unsupported