def add_words(self):
        """The data block must fill the entire data capacity of the QR code.
        If we fall short, then we must add bytes to the end of the encoded
        data field. The value of these bytes are specified in the standard.
        """

        data_blocks = len(self.buffer.getvalue()) // 8
        total_blocks = tables.data_capacity[self.version][self.error][0] // 8
        needed_blocks = total_blocks - data_blocks

        if needed_blocks == 0:
            return None

        #This will return item1, item2, item1, item2, etc.
        block = itertools.cycle(['11101100', '00010001'])

        #Create a string of the needed blocks
        return ''.join([next(block) for x in range(needed_blocks)])
def add_words ( self ) : data_blocks = len ( self . buffer . getvalue ( ) ) // 8 total_blocks = tables . data_capacity [ self . version ] [ self . error ] [ 0 ] // 8 needed_blocks = total_blocks - data_blocks if needed_blocks == 0 : return None block = itertools . cycle ( [ '11101100' , '00010001' ] ) return '' . join ( [ next ( block ) for x in range ( needed_blocks ) ] )
The data block must fill the entire data capacity of the QR code.
        If we fall short, then we must add bytes to the end of the encoded
        data field. The value of these bytes are specified in the standard.