sgmllib too slow

Stuart D. Gathman stuart at bmsi.com
Tue May 7 13:51:45 EDT 2002


On Mon, 06 May 2002 23:56:49 -0400, Peter Hansen wrote:

> "Stuart D. Gathman" wrote:
>> 
>> I've run into my very first situation where python is not "fast
>> enough". I am using the sgmllib module to parse HTML attachments in a
>> milter.  The
> 
> Other than finding that it's a male fish, I'm having trouble finding a
> definition for that word.  What's a milter?

sendmail has an interprocess interface for mail filters which it calls
'milters'.  The mail filters can be written in any desired language that
can call the C language libmilter library.  I maintain a Python wrapper
for libmilter that lets you write milters in Python:

http://www.bmsi.com/python/milter.html

> Aren't there parsers already implemented in C ala expat which have
> Python wrappers for this stuff?
> 
> In the Vaults, I found these: http://py.vaults.ca/apyllo.py?find=sgml

I am trying to stick with the standard batteries as much as possible for
the benefit of others using my code.  The best solution seems to be the
drop-in replacement in C for sgmllib mentioned by other posters which I
will try out ASAP:

http://effbot.org/downloads/


-- 
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - Mozart background
song for the Microsoft "Where do you want to go from here?" commercial.



More information about the Python-list mailing list