title: Python: Writing raw strings to a file
body: <p>I want to generate C code with a Python script, and not have to escape things. For example, I have tried:</p>
  
  <pre><code>myFile.write(someString + r'\r\n\')
  </code></pre>
  
  <p>hoping that a <code>r</code> prefix would make things work. However, I'm still getting the error:</p>
  
  <pre><code>myFile.write(someString + ur'\r\n\')
                                     ^
  SyntaxError: EOL while scanning string literal
  </code></pre>
  
  <p>How can I write raw strings to a file in Python?</p>