Read binary file of unknown size with mixed data types in python

Viewed 2478

I need to read binary files which consist of 19 float32 numbers followed by a unknown number of uint32 numbers. How can I read such a file in python?

In Matlab the equivalent looks like this:

fid = fopen('myFile.bin','r');
params = fread(fid,19,'float');
data = fread(fid,'uint32');
fclose(fid);
2 Answers
Related