davbucko at yahoo.com (Dave) writes: > At the moment I am doing crazy things like converting it to a string, > slicing characters off (ie id = packet[0:2]), adding 0x to the front > and exec-ing the whole thing to get an integer. Don't ever exec data from an untrusted source. Use int(packet[0:2], 16).