In <[EMAIL PROTECTED]>, micahc wrote: > So, how do I store "\tsome text\xa7 some more text\n" as that instead > of: > " some text§ some more text > " > > I don't have a problem escaping it so the above would look like > "\\tsome text\\xa7 some more text\\n" as long as I have a way to later > unescape it when I want to actual do something with the data.
In [6]: '\tsome text\xa7some more text\n'.encode('string_escape') Out[6]: '\\tsome text\\xa7some more text\\n' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list