expat not found...?
Pierre Fortin
pfortin at pfortin.com
Thu Jun 7 15:39:05 EDT 2001
Compiled 2.1 on Linux Mandrake 7.2 system (incl expat)...
...
gcc -fPIC -g -O2 -Wall -Wstrict-prototypes -I. -I./Include -DHAVE_CONFIG_H
-I/usr/local/src/Python/expat/xmlparse -c ./Modules/pyexpat.c -o
Modules/pyexpat.o
gcc -shared Modules/pyexpat.o -L/usr/local/src/Python/expat -lexpat -o
Modules/pyexpat.so
...
Yet, when I run a sample script (from
http://www-106.ibm.com/developerworks/xml/library/l-pxml.html?open&l=912,t=grx,p=xpyth)...
xmlsaxtest.py:
"Simple SAX example, updated for Python 2.0+"
import string
import xml.sax
from xml.sax.handler import *
class QuotationHandler(ContentHandler):
...
it won't even get past the imports...
Traceback (most recent call last):
File "xmlsaxtest.py", line 3, in ?
import xml.sax
File "xml.py", line 1, in ?
import _xmlplus.parsers.expat
ImportError: No module named _xmlplus.parsers.expat
Probably missing something obvious/subtle; but...
There is no README file in the expat distribution; though I imagine it needs to
be installed somewhere... if so, what goes where precisely...?
Thanks,
Pierre
PS: here are the files I have in expat:
# ll -R | grep -v \\.[hco] | grep -v \/$
.:
total 154
-rw-r--r-- 1 pfortin pfortin 1190 May 9 2000 Makefile
-rw-r--r-- 1 pfortin pfortin 1398 Aug 17 2000 expat.dsw
-rw-r--r-- 1 pfortin pfortin 141176 Jun 2 10:26 libexpat.a
./bin:
total 183
-rw-r--r-- 1 pfortin pfortin 53248 May 21 2000 xmlparse.dll
-rw-r--r-- 1 pfortin pfortin 81920 May 12 2000 xmltok.dll
-rw-r--r-- 1 pfortin pfortin 49152 May 21 2000 xmlwf.exe
./gennmtab:
total 30
-rwxr-xr-x 1 pfortin pfortin 15594 Jun 2 00:52 gennmtab*
-rw-r--r-- 1 pfortin pfortin 3718 Oct 22 1998 gennmtab.dsp
./lib:
total 42
-rw-r--r-- 1 pfortin pfortin 29496 May 21 2000 xmlparse.lib
-rw-r--r-- 1 pfortin pfortin 12042 May 12 2000 xmltok.lib
./sample:
total 3
-rw-r--r-- 1 pfortin pfortin 245 Jun 21 1998 build.bat
./xmlparse:
total 308
-rw-r--r-- 1 pfortin pfortin 141176 Jun 2 00:52 libexpat.a
-rw-r--r-- 1 pfortin pfortin 7056 May 12 2000 xmlparse.dsp
./xmltok:
total 256
-rw-r--r-- 1 pfortin pfortin 5909 Aug 17 2000 xmltok.dsp
./xmlwf:
total 190
-rwxr-xr-x 1 pfortin pfortin 126852 Jun 2 00:52 xmlwf*
-rw-r--r-- 1 pfortin pfortin 4554 May 12 2000 xmlwf.dsp
More information about the Python-list
mailing list