htmllib question - Is this the best tool for my task?

Aahz Maruch aahz at netcom.com
Wed Jan 5 17:31:14 EST 2000


In article <yu1so0cw4p7.fsf at black-racer.atg.com>,
chris patti  <cpatti at black-racer.atg.com> wrote:
>feoh at cosmic.com writes:
>> 
>> I have a task where I need to figure out if certain HTML tags (Rather
>> Java Server Pages tags, but they're still HTML, kinda :) contain certain
>> things in an HTML document I'd feed to the script.
>> 
>> I'm thinking htmllib is the right tool for this task, am I wrong?
>> 
>> So as far as I understand things thus far, I should subclass HTMLParser,
>> define start_java and end_java tag functions.. But where from there?
>
>To answer my own question - I ended up using regexps for this.
>htmllib was overkill.

Butting in before the Timbot, if htmllib was overkill, regexps are
probably the wrong solution.  string.find() is probably faster.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

The problem with an ever-changing .sig is that you have to keep changing it.



More information about the Python-list mailing list