[XML-SIG] PyXML newbie problem

Greg Woodhouse greg@gwoodhouse.com
Sun, 29 Dec 2002 09:06:14 -0800 (PST)


Expat is a C library used internally by PyXML (you can
also use it directly through its Python interface). It
sounds as if though you do not have Expat installed
(or installed properly). 

--- Morten Bagai <lists@bagai.com> wrote:
> Hello,
> 
> Python newbie here, trying to get started with XML
> processing in 
> Python. I'm using MacOS X 10.2, which I gathered
> hasn't got PyXML 
> installed by default. Therefore I downloaded the
> latest version (0.8.1) 
> of PyXML and attempted a build+install. All appeared
> to go reasonably 
> well, but I can't quite get it to work.
> 
> Here's a simple examlple I tried in the interpreter:
> 
> from xml.dom import minidom
> doc =
>
minidom.parse('/Library/WebServer/Documents/books.xml')
> 
> This yields the following error:
> 
> Traceback (most recent call last):
>    File "<stdin>", line 1, in ?
>    File "xml/dom/minidom.py", line 1594, in parse
>      from xml.dom import expatbuilder
>    File "xml/dom/expatbuilder.py", line 32, in ?
>      from xml.parsers import expat
>    File "xml/parsers/expat.py", line 4, in ?
>      from pyexpat import *
> ImportError: No module named pyexpat
> 
> 
> So it appears something wasn't installed properly
> after all? Any 
> pointers would be greatly appreciated.
> 
> Thanks,
> 
> Morten
> 
> 
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig


=====

Greg Woodhouse 
greg@gwoodhouse.com

It is better to be complex than complicated.