Re: Raw string printing

2007-09-25 Thread Alexandre Badez
On Sep 25, 2:24 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Alexandre Badez wrote: > > I would like to do something like: > > > s = r"a\tb\n" > > print unraw(s) # <= this is the "magic" function I'm searching for > > # result with > > ab > > n > > > Does any of you know how to do it properly ?

Re: Raw string printing

2007-09-25 Thread Peter Otten
Alexandre Badez wrote: > I would like to do something like: > > s = r"a\tb\n" > print unraw(s) # <= this is the "magic" function I'm searching for > # result with > ab > n > > Does any of you know how to do it properly ? >>> print r"a\tb\nx".decode("string-escape") a b x Peter -- h

Raw string printing

2007-09-25 Thread Alexandre Badez
Hy ! I would like to do something like: s = r"a\tb\n" print s # result with a\tb\n print unraw(s) # <= this is the "magic" function I'm searching for # result with ab n Does any of you know how to do it properly ? -- http://mail.python.org/mailman/listinfo/python-list