Oh, I didn't make myself clear.
What I mean is how to convert a piece of html to plain text bu keep as
much format as possible.
Such as convert " " to blank space and convert <br> to "\r\n"
Gary Herron wrote:
> 一首诗 wrote:
> > Is there any simple way to solve this problem?
> >
> >
> Yes, strings have a replace method:
>
> >>> s = "abc def"
> >>> s.replace(' ',' ')
> 'abc def'
>
> Also various modules that are meant to deal with web and xml and such
> have functions to do such operations.
>
>
> Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list