Longint?!
Larry Bates
lbates at swamisoft.com
Fri Jul 23 11:24:56 EDT 2004
You must read it as binary and use struct.unpack() to convert
to long integer.
HTH,
Larry Bates
Syscon, Inc.
"Ivo" <Spam at ivonet.nl> wrote in message
news:41011836$0$769$3a628fcd at reader20.nntp.hccnet.nl...
> Pythoneers,
> I am trying to reed a long integer (4 byte value like in pascal) in python
> but i don't seem to succeed.
>
> It's from a binary file where from a certain offset in the file 4 bytes
> (longint) tell how long a header is.
>
> because I don't have to assign a type to a variable I don't know how to
> ensure i get the longint type read from the file.
>
> Help very much appreciatend.
>
> --
> Cheerz,
> Ivo.
> http://IvoNet.nl
>
>
> ============================
>
>
More information about the Python-list
mailing list