def pack_command(self, *args):
    'Pack a series of arguments into the Redis protocol'
    output = []
    command = args[0]
    if (' ' in command):
        args = (tuple([Token(s) for s in command.split(' ')]) + args[1:])
    else:
        args = ((Token(command),) + args[1:])
    buff = SYM_EMPTY.join((SYM_STAR, b(str(len(args))), SYM_CRLF))
    for arg in imap(self.encode, args):
        if ((len(buff) > 6000) or (len(arg) > 6000)):
            buff = SYM_EMPTY.join((buff, SYM_DOLLAR, b(str(len(arg))), SYM_CRLF))
            output.append(buff)
            output.append(arg)
            buff = SYM_CRLF
        else:
            buff = SYM_EMPTY.join((buff, SYM_DOLLAR, b(str(len(arg))), SYM_CRLF, arg, SYM_CRLF))
    output.append(buff)
    return output
Pack a series of arguments into the Redis protocol
def pack_command(self, *args):
    
    output = []
    command = args[0]
    if (' ' in command):
        args = (tuple([Token(s) for s in command.split(' ')]) + args[1:])
    else:
        args = ((Token(command),) + args[1:])
    buff = SYM_EMPTY.join((SYM_STAR, b(str(len(args))), SYM_CRLF))
    for arg in imap(self.encode, args):
        if ((len(buff) > 6000) or (len(arg) > 6000)):
            buff = SYM_EMPTY.join((buff, SYM_DOLLAR, b(str(len(arg))), SYM_CRLF))
            output.append(buff)
            output.append(arg)
            buff = SYM_CRLF
        else:
            buff = SYM_EMPTY.join((buff, SYM_DOLLAR, b(str(len(arg))), SYM_CRLF, arg, SYM_CRLF))
    output.append(buff)
    return output