title: python: parsing strings from serial.read()
body: <p>I'm communicating between a python script on a PC and embedded c.  I have the following issue:</p>
  
  <p>From the mcu (embedded c), I'm sending the binary representation of integers and floats.  Using Br@y's terminal, I have verified that the binary representation of the numbers are being sent from the mcu. In the python script, I use pySerial's serial.read to get bytes, putting them into a list.</p>
  
  <p>If I send the following number from the mcu: 0x10000000 (16 base 10, in little endian), it shows up in the python script as '\x10\x00\x00\x00', which isn't horrible, since I can just pull characters out of consistent indices.  However, when two hex digits represent an ascii character, the string will have the ascii character instead of \xDD.</p>
  
  <p>Is there any way to force the string to use only the \xDD representation, rather than the ascii values?  Or will I have to just iterate over the string, removing '\x' and converting the ascii values as I go?</p>
  
  <p>Thanks</p>