Python readline() from a string?
<p>In python, is there a built-in way to do a readline() on string?  I have a large chunk of data and want to strip off just the first couple lines w/o doing split() on the whole string.</p>

<p>Hypothetical example:</p>

<pre><code>def handleMessage(msg):
   headerTo  = msg.readline()
   headerFrom= msg.readline()
   sendMessage(headerTo,headerFrom,msg)

msg = "Bob Smith\nJane Doe\nJane,\nPlease order more widgets\nThanks,\nBob\n"
handleMessage(msg)
</code></pre>

<p>I want this to result in:
 <code>sendMessage("Bob Smith", "Jane Doe", "Jane,\nPlease order...")</code></p>

<p>I know it would be fairly easy to write a class that does this, but I'm looking for something built-in if possible.</p>

<p>EDIT: Python v2.7</p>
