Translate escaped characters in a string

- madsurfer2000 at hotmail.com
Fri Apr 2 18:57:59 EST 2004


Hi

I have an application that reads the arguments sent to the script. If
an user enters a text like "Line 1\nLine2" (\n is slash+n, and not
LF), I would like to use \n and other supported escape sequences when
I write the text to a file.

Is there a way to do this, other than writing my own parser?



More information about the Python-list mailing list