Paul Rubin wrote:
"Martin P. Hellwig" <martin.hell...@dcuktec.org> writes:
what I usually do is read the packet in binary mode, convert the
output to a concatenated 'binary string'(i.e. '0101011000110') and

Something wrong with reading the data words as an integer and using
old fashioned shifts and masks to get at the bit fields?

No not at all of course, I just found it more readable to slice it instead of shifting and masking; i.e. if the ASCII art schematics of the protocol are included as a comment it is almost an 1 to 1 implementation.

Is there an advantage using shifts and masks over my kitchen type solution?

--
MPH
http://blog.dcuktec.com
'If consumed, best digested with added seasoning to own preference.'
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to