[Zope] Re: silva, xmlwidgets, parsedxml

Passin, Tom tpassin@mitretek.org
Thu, 17 Apr 2003 15:58:31 -0400


[garry saddington]
>=20
> I've finally sorted this out. I called setup.py with the zope=20
> python and it=20
> installed the pyXML into /zope/lib/python2.1/site-packages=20
> which mirrors what=20
> it does when installed into the normal filesystem. This still=20
> did not work!=20
> Renaming the _xmlplus directory to xml as indicated by some=20
> of the python=20
> scripts in parsedXML  did not work, but when the whole=20
> directory (as 'xml')=20
> was copied to /zope/lib/python (in the same directory as=20
> Products) it worked.=20
> The installation instructions for all the products that rely=20
> on pyXML only=20
> say that it needs to be installed, they do not specify how!=20
> Do we need a how=20
> to for this?

You approach may end up causing some trouble too.  The thing is that the
PyXML package has some magic initialization code that causes modules in
the _xmlplus directory to be found when scripts import from "xml", even
though the package is physically named "_xmlplus".  This allows the
PyXML modules to effectively replace modules of the same name that come
with the regular Python distribution.  If you call the directory "xml",
I am not to sure what will happen with regards to this magic
initialization (I do not fully understand how it works), and so I am not
sure if one can be know what modules will be imported from where.

This may be more of a problem with Python 2.2 than with 2.1.3, I am not
sure.

It may be that the magic initialization script does not work right when
the code is located in zope/lib/python (which I imagine was needed to
put it on the Python path, which is set up a little differently from a
stock Python distribution).

So I would say that some more research is needed, and maybe some help
from the PyXML group, before finalizing new instructions - which are
obviously needed.

Did you try to copy it into zope/lib/python as _xmlplus?  If this works,
it is exactly what should be done, and would be the easiest of all the
various things that have been suggested.

Cheers,

Tom P