def __init__(self, file, read_size=1024, end=False):
        """
        Tailer requires file to be opened in binary mode, otherwise
        the behavior of tell suffers from implementation detail on Windows
        where it may return negative numbers. Per modern Python documentation
        tell returns opaque number for text objects that may not represent
        number of bytes.

        :param file: File-like object opened in binary mode.
        :param read_size: How many bytes to read at once. Affects head and tail calls.
        :param end: Whether to start reading from end.

        :raise ValueError: If file is not open in binary mode.
        """
        if not isinstance(file, io.IOBase) or isinstance(file, io.TextIOBase):
            raise ValueError("io object must be in the binary mode")

        self.read_size = read_size
        self.file = file

        if end:
            self.file.seek(0, SEEK_END)
def __init__ ( self , file , read_size = 1024 , end = False ) : if not isinstance ( file , io . IOBase ) or isinstance ( file , io . TextIOBase ) : raise ValueError ( "io object must be in the binary mode" ) self . read_size = read_size self . file = file if end : self . file . seek ( 0 , SEEK_END )
Tailer requires file to be opened in binary mode, otherwise
        the behavior of tell suffers from implementation detail on Windows
        where it may return negative numbers. Per modern Python documentation
        tell returns opaque number for text objects that may not represent
        number of bytes.

        :param file: File-like object opened in binary mode.
        :param read_size: How many bytes to read at once. Affects head and tail calls.
        :param end: Whether to start reading from end.

        :raise ValueError: If file is not open in binary mode.