def __init__(self, file, channel=1):
        """
        :param file: a path-like object or as file-like object to write to
                     If this is a file-like object, is has to opened in binary
                     write mode, not text write mode.
        """
        super(BLFWriter, self).__init__(file, mode='wb')
        self.channel = channel
        # Header will be written after log is done
        self.file.write(b"\x00" * FILE_HEADER_SIZE)
        self.cache = []
        self.cache_size = 0
        self.count_of_objects = 0
        self.uncompressed_size = FILE_HEADER_SIZE
        self.start_timestamp = None
        self.stop_timestamp = None
def __init__ ( self , file , channel = 1 ) : super ( BLFWriter , self ) . __init__ ( file , mode = 'wb' ) self . channel = channel self . file . write ( b"\x00" * FILE_HEADER_SIZE ) self . cache = [ ] self . cache_size = 0 self . count_of_objects = 0 self . uncompressed_size = FILE_HEADER_SIZE self . start_timestamp = None self . stop_timestamp = None
:param file: a path-like object or as file-like object to write to
                     If this is a file-like object, is has to opened in binary
                     write mode, not text write mode.