lo there all,

i am reading a binary file with open('myfile', 'rb')

then i do a read(1) to read one byte. cool so far.

but how do i read the individual bits of a byte

i mean if i have a = read(1)

how do i know what the msb of a is ?

i need to know because i have to see if the msb is set and i also need to
know the value of the next bit.

any tips would be greatly appreciated.

thanks
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to