Python and an XML Error

Alex Martelli aleax at aleax.it
Mon Sep 17 10:46:25 CEST 2001


"Dennis Wilson" <lincwils at teleport.com> wrote in message
news:mailman.1000612099.22596.python-list at python.org...
> When I try to use the xml.sax lin in python, I get the following error
> message.
>
> FILE "/usr/lib/python2.1/xml/sax/__init__.py", line 88, in make_parser
>    raise SAXReaderNotAvailable("No Parsers found", None)
>
> I understand what this means. There is no sax parser available. I am
wonder
> what suggestion anyone has to which saxparser to install and any hints on
> the procedure would be welcome.

expat is lightweight and fast.  It comes with the Windows
version of Python.  On Cygwin, it requires a tiny patch to
be able to build it correctly (we discussed it the other
day on this group); on any Unix-like platform, it should
just require configure/make/make install to build it from
sources.  See expat.sourceforge.net.

Once you do have expat installed on your box, you need to
ensure the pyexpat Python extension module is built to
allow Python to access expat.  In case you don't feel like
rebuilding all of Python from sources just to get pyexpat,
I've described a simple workaround to rebuild pyexpat only
on the same thread about Cygwin and expat.

See e.g. (a single URL!):
http://groups.google.com/groups?hl=en&threadm=9nnfk402ddc%40enews1.newsguy.c
om&rnum=2&prev=/groups%3Fq%3Dexpat%2Bgroup:comp.lang.python%2Bauthor:alex%2B
author:martelli%26hl%3Den%26rnum%3D2%26selm%3D9nnfk402ddc%2540enews1.newsguy
.com


Alex






More information about the Python-list mailing list