myString = "bar\foo\12foobar"
print repr(myString)
My "problem" was that I wanted to know if there is a way of printing
"unraw" strings like myString so that the escape characters are written
like a backslash and a letter or number. My understanding was that
repr() did this and it does in most cas
I think I might have misused the terms "escape character" and/or
"escape sequence" or been unclear in some other way because I seem to
have confused you. In any case you don't seem to be addressing my
problem.
I know that the \t in the example path is interpreted as the tab
character (that was par
Hi,
My application is receiving strings, representing windows paths, from
an external source. When using these paths, by for instance printing
them using str() (print path), the backslashes are naturally
interpreted as escape characters.
>>> print "d:\thedir"
d: hedir
The solution is to use