Re: Noobie: Open file -> read characters & multiply

2006-12-27 Thread gonzlobo
Thanks to all that responded. I chose a modified version of Scott's second recommendation: time = line[:8] decoded_File.write( '%00.4f' % (int(time, 16) * .0001) + ', ') 'print >>' added a CRLF that I didn't need, so I went with '.print' (I need to process about 20 values from the remaining bytes

Re: Noobie: Open file -> read characters & multiply

2006-12-26 Thread WaterWalk
WaterWalk wrote: > WaterWalk wrote: > > gonzlobo wrote: > > > I've been using Python for a few days. It's such the perfect language > > > for parsing data! > > > > > > I really like it so far, but I'm having a hard time reading a file, > > > reading the first few hex characters & converting them t

Re: Noobie: Open file -> read characters & multiply

2006-12-26 Thread WaterWalk
WaterWalk wrote: > gonzlobo wrote: > > I've been using Python for a few days. It's such the perfect language > > for parsing data! > > > > I really like it so far, but I'm having a hard time reading a file, > > reading the first few hex characters & converting them to an integer. > > Once the char

Re: Noobie: Open file -> read characters & multiply

2006-12-26 Thread WaterWalk
gonzlobo wrote: > I've been using Python for a few days. It's such the perfect language > for parsing data! > > I really like it so far, but I'm having a hard time reading a file, > reading the first few hex characters & converting them to an integer. > Once the characters are converted to an inte

Re: Noobie: Open file -> read characters & multiply

2006-12-26 Thread Steven D'Aprano
On Tue, 26 Dec 2006 16:50:06 -0700, gonzlobo wrote: > I've been using Python for a few days. It's such the perfect language > for parsing data! > > I really like it so far, but I'm having a hard time reading a file, > reading the first few hex characters & converting them to an integer. > Once th

Re: Noobie: Open file -> read characters & multiply

2006-12-26 Thread Scott David Daniels
gonzlobo wrote: > I've been using Python for a few days. It's such the perfect language > for parsing data! > > I really like it so far, but I'm having a hard time reading a file, > reading the first few hex characters & converting them to an integer. > Once the characters are converted to an inte

Noobie: Open file -> read characters & multiply

2006-12-26 Thread gonzlobo
I've been using Python for a few days. It's such the perfect language for parsing data! I really like it so far, but I'm having a hard time reading a file, reading the first few hex characters & converting them to an integer. Once the characters are converted to an integer, I'd like to write the d