Binary file to integers

(Rhino Python beginner)

I read a binary file and i want to convert each byte to an integer. how can do that?

example code:
infile = open(‘blablabla.raw’, ‘rb’)
buffer = infile.readlines()
infile.close()

print(type(buffer)) ==> ‘list’
print((buffer)) ==> [u’\xff\xff\xfe\xfe\xfb\xfc\xfe…and so on

Do I have to read the file in a different way? Or is it possible to convert each 8 bit to a integer, but how do you do that?

Depends on how your binary data is formatted, but perhaps

gives you some pointers.