Fredrik Lundh wrote:
"ouz as" <[EMAIL PROTECTED]> wrote:
i have an electronic module which only understand binary data.
i use python pyserial.
for example the module starts when 001000000 8-bit binary data sent.but
... in computers, bits are combined into bytes (or longer machine words).
the strings you pass to pyserial are treated as byte sequences....
Just one other bit (byte?) of data that wasn't mentioned here:
the array module also provides handy conversions.
array.array('B', [1,2,3,4]).tostring() == '\1\2\3\4'
This may prove useful as you create message packets.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list