"Karl Scalet" <news@yebu.de> a écrit dans le message de news:
blrgg6$epn59$1@ID-141451.news.uni-berlin.de...[color=blue]
> Gilles Lenfant wrote:[color=green]
> > Hi,
> >
> > I make an app where I need to convert HTML to text in a "clever" way[/color][/color]
(means[color=blue][color=green]
> > it tries to mimic when possible a browser rendering).
> > Actually I spawn with popen2 a "lynx" that makes a perfect job.[/color]
>
> i've seen an example in python cookbook, but do not have the copy with
> me right now. If you have that book, look at the example to send HTML
> mails. keywords are htmllib and formatter/AbstractFormatter.
> IIRC they mention it's not that perfect as doing the same with lynx.
> Don't know if the onlineversion at activestate does have this example.
>[color=green]
> >
> > But I need a 100% pythonic stuff to have my app (Zope product) running[/color][/color]
on[color=blue][color=green]
> > non Unix boxes.[/color]
>
> That would be 100% pythonic even w/o external stuff.
>[color=green]
> >
> > Any hint ?
> >
> > Thanks in advance.
> >
> > --Gilles
> >[/color]
>
> HTH Karl
>[/color]
Thanks Karl, I found what you're talking about
http://aspn.activestate.com/ASPN/Coo...n/Recipe/52297
Need to rework that TtyFormatter in depth to mimic lynx :o)
Cheers
--Gilles