def execute_command(self, *args, **kwargs):
        if self.connected == 0:
            raise ConnectionError("Not connected")
        else:
            cmds = []
            cmd_template = "$%s\r\n%s\r\n"
            for s in args:
                if isinstance(s, str):
                    cmd = s
                elif isinstance(s, unicode):
                    try:
                        cmd = s.encode(self.charset, self.errors)
                    except UnicodeEncodeError, e:
                        raise InvalidData(
                            "Error encoding unicode value '%s': %s" %
                            (repr(s), e))
                elif isinstance(s, float):
                    try:
                        cmd = format(s, "f")
                    except __HOLE__:
                        cmd = "%0.6f" % s
                else:
                    cmd = str(s)
                cmds.append(cmd_template % (len(cmd), cmd))
            self.transport.write("*%s\r\n%s" % (len(cmds), "".join(cmds)))
            r = self.replyQueue.get().addCallback(self.handle_reply)

            if self.inTransaction:
                self.post_proc.append(kwargs.get("post_proc"))
            else:
                if "post_proc" in kwargs:
                    f = kwargs["post_proc"]
                    if callable(f):
                        r.addCallback(f)

            return r

    ##
    # REDIS COMMANDS
    ##

    # Connection handling
dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/txredisapi.py/RedisProtocol.execute_command