win32 Zope 2.5.0 vs python2.1&win32all

Robin Becker robin at jessikat.fsnet.co.uk
Thu Feb 14 09:44:08 EST 2002


In article <jPLZkiAw77a8EwM7 at jessikat.demon.co.uk>, Robin Becker <robin at jessikat.fsnet.co.uk> writes
.....
>well I think you just have to look at the path printed out to see that something 
>is wrong. There should
>logically be no path elements starting without the prefix c:\Python\ZOPE_2_5_0 
>as that is my Zope home. The
>other path elements creep in because of the win32all registry paths.
>
>I'm not doing anything here except running the python.exe that came with zope. 
>If the path is wrong in
>zopexxx\bin\python.exe there's not much I can do about it except to try and 
>eliminate path elements in z2.py
>which I'm not yet doing.
>
>When I run zope it's via the standard service mechanism. Using procexp I can see 
>mixed pyds if I don't
>eliminate the registry path.
......
>sys.path = filter(lambda p,swhome=swhome: not p or swhome.lower()==p[0:len(swhom
>e)].lower(),sys.path)
>but it seems hard to guarantee that we get the right sys unless we mess with imp 
>et al.
....
sys being built in we should always get the right one. The service starts up python
with the 8.3 mangled dos names as standard so then it's hard to filter out
non-standard path elements using swhome which is in long filename form.
When I put in a filter looking like

sys.path = filter(lambda p,swh=swhome[:-5]: not p or swh.lower()==p[:len(swh)].lower(),sys.path)

then magically I can start up and stop the service OK and all seems to be well.
-- 
Robin Becker



More information about the Python-list mailing list