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