Htmllib help

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Jul 9 10:27:03 CEST 2007


En Fri, 06 Jul 2007 03:44:20 -0300, <axjacob at comcast.net> escribió:

> Thats right I don't need the output any where so I don't need to use the  
> writer. I can remove it wowever will the formater work since it needs  
> writer? Maybe I can use the Null writer?

Exactly. Look at the HTMLParser module too; depending on your needs, it  
may be easier to use.

>  -------------- Original message ----------------------
> From: "Gabriel Genellina" <gagsl-py2 at yahoo.com.ar>
>> En Thu, 05 Jul 2007 20:23:08 -0300, <axjacob at comcast.net> escribió:
>> >
>> > Even though I don't use any print statements, the htmllib seems to be
>> > throwing parts of the html page on to the standard out(my screen in  
>> this
>> > case). Is there a way to disable the output?
>> >
>> > import htmllib
>> > w = formatter.DumbWriter()
>>
>> Change the above line. From  
>> http://docs.python.org/lib/writer-impls.html:
>> "class DumbWriter([file[, maxcol = 72]])
>> 	Simple writer class which writes output on the file object passed in as
>> file or, if file is omitted, on standard output."

-- 
Gabriel Genellina




More information about the Python-list mailing list