HTMLParser problems.

Sean Cody sean at -[NOSPAMPLEASE]-tfh.ca
Fri Oct 31 11:22:48 EST 2003


> > I could try:
> >         def handle_entityref(self,entity):
> >                 if self.in_td == 1:
> >                     if entity == "nbsp":
> >                         self.row.append(-1)
> >
> > But that seems ulgy... (comments?).
>
> Does this work?  For me, that comes first.
>
Actually yes it does.

I wonder if there is a better way as I'm just stumbling through the
HTMLParser class.
The best thing about python is the stumbling through getting things done is
not as painful as it would be in other languages.

I use a lot of member variables. Is there a way to not have to reference
members by self.member.  Back in the day in pascal you could do stuff like
"with self begin do_stuff(member_variable); end;" which was extremely useful
for large 'records.'

--
Sean






More information about the Python-list mailing list