[XML-SIG] Preparing for PyXML 0.8

Fred L. Drake, Jr. fdrake@acm.org
Tue, 30 Jul 2002 22:31:04 -0400


Uche Ogbuji writes:
 > I have a very simple DOM reader based on HTMLParser.  Should I
 > check this in with the right try/except around the import?  It
 > might even address the recent problem with the sgmlop parser and
 > numerical char entities.

The HTMLParser module from the standard library?  Or is there another
I'm missing?

I suppose it's not unreasonable, but I'd think there's a lot to be
added to the basic parser code, which is really little more than a
"high-level tokenizer."

Why would you need to catch an ImportError?  ...  Hm.  Getting around
lack of that module in 2.1.x and earlier is fairly painful.  One
option would be to include a copy of it in xml.parsers (or better yet,
hidden away where it can be forgotten!).

Does it make more sense to figure a hack around the repeated-import
issues or just fix problems in sgmlop so it can always be used?


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation