On Nov 11, 8:15 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote: > On Nov 10, 11:49 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > Call me crazy if you like, but I'd name that function IEEEtoIBM. > > But it's topsy-turvy day! Didn't you get the memo? > > Oh, all right. IEEEtoIBM it is. > > > That's a hexadecimal representation in lowercase with no leading > > zeroes ... variable length and lowercase doesn't seem very IBM to me. > > True. Replace "%x" with "%016X" for fixed-length uppercase. Or as you > say, bytes output is probably more natural. I was guessing that the > OP > wants to write the converted float out to an ASCII file, in hex.
Sheesh. It's an *IBM mainframe* file. It would need to be in EBCDIC, not ASCII. But why guess? He said he wanted to write it out in SAS XPORT format. -- http://mail.python.org/mailman/listinfo/python-list