Reading binary data from a file.

Mats Lidell (Mats.Lidell@eua.ericsson.se)
Wed, 3 Nov 93 08:41:54 +0100

Hi Folks,

Just found myself wanting to do this:

Integer = f.read(4)

Yes. I have an integer (in binary) on a file and I know that my
machine representation of this interger is 4 bytes. So I want to read
these 4 bytes and convert them into a python integer. Is there some
support for this or do I have to do a conversion function?

%% Mats