to
Windows. Worked just fine.
John Purser
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Julie LaiSent:
Wednesday, August 24, 2005 18:20To:
tutor@python.orgSubject: [Tutor] Handling binary
file
I have opened a file in binary
mode. The 9th,
10th and 11th bytes contain
> I have opened a file in binary mode.
> The 9th, 10th and 11th bytes contain the time in seconds.
> In order to get this value in decimal I did the following:
>
> timeinsec = bytes[9] * 65536 + bytes[10] * 256 + bytes{11]
>
> Would someone please advise if there is a better way to do
> this?
You
I have opened a file in binary mode.
The 9th, 10th and 11th bytes contain the time in seconds.
In order to get this value in decimal I did the following:
timeinsec = bytes[9] * 65536 + bytes[10] * 256 + bytes{11]
Would someone please advise if there is a better way to do this?
Thanks,
Julie.