def pack_commands(self, commands):
    'Pack multiple commands into the Redis protocol'
    output = []
    pieces = []
    buffer_length = 0
    for cmd in commands:
        for chunk in self.pack_command(*cmd):
            pieces.append(chunk)
            buffer_length += len(chunk)
        if (buffer_length > 6000):
            output.append(SYM_EMPTY.join(pieces))
            buffer_length = 0
            pieces = []
    if pieces:
        output.append(SYM_EMPTY.join(pieces))
    return output
Pack multiple commands into the Redis protocol
def pack_commands(self, commands):
    
    output = []
    pieces = []
    buffer_length = 0
    for cmd in commands:
        for chunk in self.pack_command(*cmd):
            pieces.append(chunk)
            buffer_length += len(chunk)
        if (buffer_length > 6000):
            output.append(SYM_EMPTY.join(pieces))
            buffer_length = 0
            pieces = []
    if pieces:
        output.append(SYM_EMPTY.join(pieces))
    return output