title: pySerial 2.6: specify end-of-line in readline()
body: <p>I am sending commands to Eddie using pySerial. I need to specify a carriage-return in my readline, but pySerial 2.6 got rid of it... Is there a workaround?</p>
  
  <p>Here are the <a href="https://www.parallax.com/sites/default/files/downloads/550-28990-Eddie-Command-Set-v1.2.pdf#page=2" rel="noreferrer">Eddie command set</a> is listed on the second and third pages of this PDF. Here is a <a href="http://i.imgur.com/5ZZhLGm.png" rel="noreferrer">backup image</a> in the case where the PDF is inaccessible.</p>
  
  <h3>General command form:</h3>
  
  <pre><code>Input:              &lt;cmd&gt;[&lt;WS&gt;&lt;param1&gt;...&lt;WS&gt;&lt;paramN&gt;]&lt;CR&gt;
  Response (Success): [&lt;param1&gt;...&lt;WS&gt;&lt;paramN&gt;]&lt;CR&gt;
  Response (Failure): ERROR[&lt;SP&gt;-&lt;SP&gt;&lt;verbose_reason&gt;]&lt;CR&gt; 
  </code></pre>
  
  <p>As you can see all responses end with a <code>\r</code>. I need to tell pySerial to stop.</p>
  
  <h3>What I have now:</h3>
  
  <pre class="lang-py prettyprint-override"><code>def sendAndReceive(self, content):
    logger.info('Sending {0}'.format(content))
    self.ser.write(content + '\r')
    self.ser.flush();
    response = self.ser.readline() # Currently stops reading on timeout...
    if self.isErr(response):
      logger.error(response)
      return None
    else:
      return response
  </code></pre>