import can't find xml.sax.saxlib from PyXML

S

Stefan Behnel

Hi!

I'm using PyXML 0.8.3 on a number of machines. When I now run

import xml.sax.saxlib

python touches both the python/xml/sax and python/site-packages/_xmlplus
modules but not _xmlplus/sax (I see that from strace), and then only
searches for saxlib in python/xml/sax, i.e. in stdlib. I therefore get an
ImportError though saxlib exists in _xmlplus/sax.

I know that it worked before, but I can't tell what changed on the systems
during new installations of new python versions. I tried it with 2.3
(which worked before but somewhat surprisingly doesn't work any more) and
2.4 (where I never managed to make this work).

Does anyone have a hint what I could try?

Thanks,
Stefan
 
?

=?ISO-8859-15?Q?Walter_D=F6rwald?=

Stefan said:
Hi!

I'm using PyXML 0.8.3 on a number of machines. When I now run

import xml.sax.saxlib

python touches both the python/xml/sax and python/site-packages/_xmlplus
modules but not _xmlplus/sax (I see that from strace), and then only
searches for saxlib in python/xml/sax, i.e. in stdlib. I therefore get
an ImportError though saxlib exists in _xmlplus/sax.

I know that it worked before, but I can't tell what changed on the
systems during new installations of new python versions. I tried it with
2.3 (which worked before but somewhat surprisingly doesn't work any
more) and 2.4 (where I never managed to make this work).

Does anyone have a hint what I could try?

xml/__init__.py from python 2.4 contains:
_MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
so currently Python 2.4 will always fall back to the
builtin xml module.

A quick fix would be to change this back to:
_MINIMUM_XMLPLUS_VERSION = (0, 8, 3)

(Or hope that a PyXML 0.8.4 will be released before
Python 2.4 final)

Bye,
Walter Dörwald
 
?

=?ISO-8859-15?Q?Walter_D=F6rwald?=

Stefan said:
Hi!

I'm using PyXML 0.8.3 on a number of machines. When I now run

import xml.sax.saxlib

python touches both the python/xml/sax and python/site-packages/_xmlplus
modules but not _xmlplus/sax (I see that from strace), and then only
searches for saxlib in python/xml/sax, i.e. in stdlib. I therefore get
an ImportError though saxlib exists in _xmlplus/sax.

I know that it worked before, but I can't tell what changed on the
systems during new installations of new python versions. I tried it with
2.3 (which worked before but somewhat surprisingly doesn't work any
more) and 2.4 (where I never managed to make this work).

Does anyone have a hint what I could try?

xml/__init__.py from python 2.4 contains:
_MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
so currently Python 2.4 will always fall back to the
builtin xml module.

A quick fix would be to change this back to:
_MINIMUM_XMLPLUS_VERSION = (0, 8, 3)

(Or hope that a PyXML 0.8.4 will be released before
Python 2.4 final)

Bye,
Walter Dörwald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top