How to read strings cantaining escape character from a file and use it as escape sequences?

James Matthews nytrokiss at gmail.com
Sat Dec 1 12:34:51 EST 2007


Also alot of times in the interactive interpeter it will show you charater
codes!

On Dec 1, 2007 6:04 PM, slomo <slimaak at gmail.com> wrote:

> WOW! Great! Thanks, Duncan.
>
>
> On 12월2일, 오전12시33분, Duncan Booth <duncan.bo... at invalid.invalid> wrote:
> > slomo <slim... at gmail.com> wrote:
> > >>>> print line
> > > \u0050\u0079\u0074\u0068\u006f\u006e
> >
> > > But I want to get a string:
> >
> > > "\u0050\u0079\u0074\u0068\u006f\u006e"
> >
> > > How do you make it?
> >
> > line.decode('unicode-escape')
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071201/65488860/attachment.html>


More information about the Python-list mailing list