rx_data1=0 while (rx_data1 != 0x46): rx_data1 = ser.read(1) (rx_command) = unpack('1B', rx_data1)
Isn't this unpack rather redundant -- assuming ser.read(1) only reads one byte, then rx_data1 and rx_command would be identical.
Brain fart... unpack converts the raw bytes to integer values with the "B" format character. You're thinking of what would happen with a "1c" format.
-Peter -- http://mail.python.org/mailman/listinfo/python-list