[Zope] Re: silva, xmlwidgets, parsedxml

Passin, Tom tpassin@mitretek.org
Thu, 17 Apr 2003 17:00:09 -0400


[ Dieter Maurer]

> Passin, Tom wrote at 2003-4-15 17:10 -0400:
>  > ...
>  > That is the other approach... but I am not sure it works=20
> in Windows,
>  > though, because maybe (I am not sure) setup checks the=20
> registry and does
>  > not find Zope's Python installation there.
>=20
> You may be right but it would be stupid (to look into the registry
> when the executing Python has all information at hand).
>=20


OK, I have done some experimenting and have some definitive results on
Windows with regards to PyXML.

I created a fresh new install of Zope 2.6 (the version on the zope.org
site this afternoon).  Then I downloaded the PyXML 0.8.1 for Python 2.1
(this is the last version that will work withPy2.1).  I ran the
installer, and as expected, it could not find the Zope python
installation.

I installed PxXML 0.8.1 in my regular (non-Zope) Py 2.1.3 installation.
Then I copied the _xmlplus directory tree to=20

D:\Program Files\Zope2.6\bin\_xmlplus

In other words, copy it into the zope/bin directory, which is on Zope's
Python path.

VERY IMPORTANT, yet often forgotten - DELETE ALL *.PYC AND *.PYO FILES
when you move python code to a new location.  Those files can contain
complete paths which are now obsolete, and can cause otherwise good code
to fail.  That happened in this case.

After this, I was able to sucessfully do PyXml-related commands like

D:>"D:\Program Files\Zope2.6\bin\python.exe"
Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import xml.xpath
>>> import xml.xslt
>>>

I have not tested anything else, but this shows the installation is
working.  I think that you want to copy _xmlplus to somewhere on the
Python path that would be found before the regular xml package would be
found (it might work anyway, but this would be safer), and this way
achieves this goal.

Cheers,

Tom P