[ZODB-Dev] ZEO2, sys.path, start.py and docs
Adrian van den Dries
adriand@flow.com.au
Wed, 27 Nov 2002 21:23:33 +1100
Hello!
I have just downloaded and tried to install ZEO 2.0, following the
instructions in docs/ZopeREADME.txt, but I have come up against this
error:
adriand@baldrick:~/Zope/ZSS$ python lib/python/ZEO/start.py -p 9999 -D
Traceback (most recent call last):
File "lib/python/ZEO/start.py", line 235, in main
ImportError: No module named StorageServer
Upon inspection, I see that start.py does some sys.path munging,
inserting 'lib/python'. But later on, it does a os.chdir(env.var), so
this path is now relative to the var directory. The problem goes away
if I use an absolute path to start.py or disable ZDaemon.
Have I done something wrong or is the README incorrect?
I am using stock Debian/woody python2.1.3.
P.S. It seems to me that this whole path-munging business is about
finding where Zope lives, which would be solved with a (suprise,
surprise) java-style ZOPE_HOME, set either at installation time or by
the administrator. Surely this would be easier and less error-prone
than cryptic path-munging functions?
P.P.S. Can we replace os.path.split(d)[0] with os.path.dirname(d),
please?
a.