title: readline() result in pyserial python 2 and 3 compatibility
body: <p>I am writing a simple code to communicate with several identical RS-232 devices using pyserial. I send a command and get a reply. The 6th element in the reply is my ID. This ID is used to define which device I am talking to.</p>
  
  <p>I want to have a more elegant syntax that extracts the 6th element as an integer in both Python 3 and Python 2. Is there a more elegant way then just write two different functions that I call depending on which Python is used.</p>
  
  <p>In case of Python 3</p>
  
  <pre><code>&gt;&gt;&gt; port = Serial('/dev/cu.usbserial4')
  &gt;&gt;&gt; port.baudrate = 9600
  &gt;&gt;&gt; port.timeout = 0.4
  &gt;&gt;&gt; port.write(b"/1?80\r")
  6
  &gt;&gt;&gt; reply = port.readline()
  &gt;&gt;&gt; reply
  b'\xff/0`ZA4\x03\r\n'
  &gt;&gt;&gt; reply[6]
  52
  &gt;&gt;&gt; chr(reply[6])
  '4'
  &gt;&gt;&gt; int(chr(reply[6]))
  4
  </code></pre>
  
  <p>In case of Python 2</p>
  
  <pre><code>&gt;&gt;&gt; port = Serial('/dev/cu.usbserial4')
  &gt;&gt;&gt; port.baudrate = 9600
  &gt;&gt;&gt; port.timeout = 0.4
  &gt;&gt;&gt; port.write(b"/1?80\r")
  6
  &gt;&gt;&gt; reply = port.readline()
  &gt;&gt;&gt; reply
  '\xff/0`ZA4\x03\r\n'
  &gt;&gt;&gt; reply[6]
  '4'
  &gt;&gt;&gt; int(reply[6])
  4
  </code></pre>