title: Is there a Python module to parse line break notation in a raw string?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python">Process escape sequences in a string in Python</a>  </p>
  </blockquote>
  
  
  
  <p>If I get this string, for example from a web form:</p>
  
  <pre><code>'\n test'
  </code></pre>
  
  <p>The <code>'\n'</code> notation won't be interpreted as a line break. How an I parse this string so it becomes a line break?</p>
  
  <p>Of course I can use <code>replace</code>, <code>split</code>, <code>re</code>, etc, to do it manually.</p>
  
  <p>But maybe there is a module for that, since I don't want to be forced to deal with all the <code>\something</code> notations manually. </p>
  
  <p>I tried to turn it into bytes then use <code>str</code> as a construtor but that doesn't work:</p>
  
  <pre><code>&gt;&gt;&gt; str(io.BytesIO(ur'\n'.encode('utf-8')).read())
  '\\n'
  </code></pre>