On Jul 19, 8:04 am, twgray <twgray2...@gmail.com> wrote: > send a 4 byte address from the embedded device, how do I convert that, > in Python, to a 4 byte, or long, number?
struct.unpack() is your friend. Presuming the embedded device is little-endian, you do: the_int = struct.unpack('<I', four_bytes)[0] See http://docs.python.org/library/struct.html -- http://mail.python.org/mailman/listinfo/python-list