On Tue, 14 Dec 2004 16:57:02 +0100, rumours say that "Fredrik Lundh" <[EMAIL PROTECTED]> might have written:
>how about: > > # convert to byte string > import struct > s = "".join([chr(int(c, 16)) for c in x]) > v = struct.unpack("!f", s) I think that the third line in the snippet above could also be: s = "".join(x).decode("hex") I am not sure I remember in which version of Python the hex codec was added, but it is handy. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list