Data reading problem

Michal Szpadzik mszpadzik at o2.pl
Sun Dec 19 10:27:49 EST 2004


I'm a newbie.

	I have some problems with bits data reading. I have binary data file 
where data is written as 12bits pack. I need to read it becouse there 
are saved values which have to processed later by my program. I was 
wandering about reading 3bytes=24bits and split it by bits moving. If 
anyone know how to do that please tell me or give me some code.

My data example:
101001000101111010100101 etc

i need to split it:
x=101001000101   y=111010100101

and then do:
mydata=x*a+b 	where a and b are a float point numbers
mydata2=y*a+b

Sorry for my poor english. I wish You understand what I mean.

THX for any answer.

--
Mike Szpadzik



More information about the Python-list mailing list