Binary Header

Benoit BESSE benoit.besse at club-internet.fr
Thu Jun 19 09:48:16 EDT 2003


How can I translate a list of int into binary. The struct.pack('!B',...)
need only integer.
I want to have a 8 bit value which represent by
V (3 bit) = 1
A (1 bit) = 0
R (1 bit) = 0
T (1 bit) = 0 or 1
E (1 bit) = 0
C (1 bit) = 0
Can I pack (1,0,0,1,0,0) ?
Thanks.

Excusez moi pour mon franglais. A ces francais.






More information about the Python-list mailing list