Re: convert binary to float

2008-06-03 Thread Lie
On Jun 2, 2:55 am, Mason <[EMAIL PROTECTED]> wrote: > I have tried and tried... > > I'd like to read in a binary file, convert it's 4 byte values into > floats, and then save as a .txt file. > > This works from the command line (import struct); > >     In [1]: f = open("test2.pc0", "rb") >     In [

Re: convert binary to float

2008-06-01 Thread Mark Tolonen
"George Sakkis" <[EMAIL PROTECTED]> wrote in message news:829b1e8f-baac-4ff4-909b->[EMAIL PROTECTED] On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: I have tried and tried... I'd like to read in a binary file, convert it's 4 byte values into floats, and then save as a .txt file. This works

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 6:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 12:55:45 -0700 (PDT), Mason > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > > I have tried and tried... > > > I'd like to read in a binary file, convert it's 4 byte values into > > floats,

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 5:12 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: > > > > > I have tried and tried... > > > I'd like to read in a binary file, convert it's 4 byte values into > > floats, and then save as a .txt file. > > > This works from the command

Re: convert binary to float

2008-06-01 Thread George Sakkis
On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: > I have tried and tried... > > I'd like to read in a binary file, convert it's 4 byte values into > floats, and then save as a .txt file. > > This works from the command line (import struct); > >     In [1]: f = open("test2.pc0", "rb") >     In [

convert binary to float

2008-06-01 Thread Mason
I have tried and tried... I'd like to read in a binary file, convert it's 4 byte values into floats, and then save as a .txt file. This works from the command line (import struct); In [1]: f = open("test2.pc0", "rb") In [2]: tagData = f.read(4) In [3]: tagData Out[3]: '\x00\x00\x