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 b

Re: Write an hexadecimal file

2005-03-30 Thread Larry Bates
Python you open the file with "wb" mode. Example: fp=open('myfile.dat', 'wb') fp.write(bytes) fp.close() >From your post I cannot tell anything more about what you are actually doing, so I hope this helps. Larry Bates Cesar Andres Roldan Garcia wrote:

Write an hexadecimal file

2005-03-30 Thread Cesar Andres Roldan Garcia
Hi 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. That number is the one I'm gonna write in the hex file... can anybody help me 'cause i don't know how python w