Re: struct.unpack less than 1 byte

2007-10-10 Thread Stargaming
On Wed, 10 Oct 2007 03:42:15 -0700, John Machin wrote: > On Oct 10, 8:15 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> 2007/10/10, cprogrammer <[EMAIL PROTECTED]>: >> > i need to read from a file a struct like this [1byte, 12bits, 12bits] >> > reading 1 byte or more is not a problem ... but t

Re: struct.unpack less than 1 byte

2007-10-10 Thread John Machin
On Oct 10, 8:15 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2007/10/10, cprogrammer <[EMAIL PROTECTED]>: > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > > reading 1 byte or more is not a problem ... but the 12 bits values > > are ... > > 12bits, 12bits == 3 byes a

Re: struct.unpack less than 1 byte

2007-10-10 Thread Michal Bozon
You are able to read single bits from file in C ? You'll have to read the bytes and than perform some bitwise operations on them to extract the bits > hello all, > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > reading 1 byte or more is not a problem ... but the 12 bit

Re: struct.unpack less than 1 byte

2007-10-10 Thread Guilherme Polo
2007/10/10, cprogrammer <[EMAIL PROTECTED]>: > hello all, > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > reading 1 byte or more is not a problem ... but the 12 bits values > are ... > > thanks > > -- > http://mail.python.org/mailman/listinfo/python-list > 12bits, 12bit

struct.unpack less than 1 byte

2007-10-10 Thread cprogrammer
hello all, i need to read from a file a struct like this [1byte, 12bits, 12bits] reading 1 byte or more is not a problem ... but the 12 bits values are ... thanks -- http://mail.python.org/mailman/listinfo/python-list