HTMLLib.py use

Fredrik Lundh fredrik at pythonware.com
Mon May 3 12:58:12 EDT 1999


Matthew Cepl <cepl at fpm.cz> wrote:
> trying to learn using HTMLLib.py I did try the following code, but it gives
> me error . Everything is included in this mail. What's wrong with me?

you forgot to pass the HTMLParser class a valid formatter
object.  

...

import formatter

...

    def __init__(self, verbose=0):
        self.testdata = "
        HTMLParser.__init__(self, formatter.NullFormatter(), verbose)

...

for more info, see:
http://www.python.org/doc/current/lib/module-htmllib.html
http://www.python.org/doc/current/lib/module-formatter.html
http://www.python.org/doc/current/lib/formatter-impls.html

</F>





More information about the Python-list mailing list