def __repr__(self):
        if self.direction == TO_SERVER: s = ">>>"
        else:                           s = "<<<"
        format = "[%s] %s 0x%02x: %-"+str(max([len(i) for i in names.values()])+1)+"s%s"
        return format % (strftime("%H:%M:%S", gmtime()), s, self.ident, names[self.ident], str(self.data))
dataset/ETHPy150Open barneygale/barneymc/barneymc/protocol/packet.py/Packet.__repr__/original