Re: Write an hexadecimal file

2005-03-30 Thread rbt
Larry Bates wrote: There is not such thing as a hexadecimal file. Right, 300 is 300 whether you choose to represent it in decimal, binary, hex, etc... it's still only 300 of something ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Write an hexadecimal file

2005-03-30 Thread Raymond Hettinger
[Cesar Andres Roldan Garcia] > I'm trying to write an hexadecimal file... I mean not a text plain... >I have to convert a float decimal number in float hexadecimal one, > and that's done. The struct module provides a portable way to convert a float to and from a sequence of bytes. The binascii mo

Re: Write an hexadecimal file

2005-03-30 Thread Larry Bates
There is not such thing as a hexadecimal file. Files are either binary or text. Hexadecimal is a representation of binary data where 4 bits are displayed as a single hex digit (0-F) as shorthand (because 0000111 is just too difficult to deal with). To write binary data to a file in P