[Zope] ZServer and ZPublisher

Phil Harris wmlph@d033.ml.uwcm.ac.uk
Fri, 19 Feb 1999 08:34:55 -0000


Your perfectly right and about twenty seconds after posting, I realised and
set the PYTHONPATH and it worked.

At least ZServer started, I am now having trouble getting ZServer to play
ball with FTP connections, I'll struggle on for the moment, since as the
docs say, ZServer is for playing with at the moment.  I don't intend to use
it for any mission critical stuff at least 8^).

Thanks for the message.

See ya

Phil
----- Original Message -----
From: Amos Latteier <amos@aracnet.com>
To: Phil Harris <wmlph@d032.ml.uwcm.ac.uk>
Cc: <zope@zope.org>
Sent: Thursday, February 18, 1999 8:10 PM
Subject: Re: [Zope] ZServer and ZPublisher


>At 09:23 AM 2/18/99 -0000, "Phil Harris" wrote:
>
>>When trying to start ZServer's start.py, after making the relevant
changes,
>>and compiling in threads etc.  I get this message:
>>
>>log: adding channel <trigger  at 8134518>
>>Traceback (innermost last):
>>  File "./start.py", line 19, in ?
>>    import zope_handler
>>  File "./zope_handler.py", line 121, in ?
>>    from PubCore import handle
>>  File "./PubCore/__init__.py", line 86, in ?
>>    import ZRendezvous
>>  File "./PubCore/ZRendezvous.py", line 88, in ?
>>    from ZServerPublisher import ZServerPublisher
>>  File "./PubCore/ZServerPublisher.py", line 86, in ?
>>    from ZPublisher import publish_module
>>ImportError: No module named ZPublisher
>>
>>I looked in the PubCore directory and lo and behold there is no ZPublisher
>>module.
>
>
>ZPublisher is a very important ;-) Zope package. It is not a special part
>of ZServer. It should be located in Zope's 'lib/python' directory.
>
>My guess is that your Python path is wrong, and ZPublisher is not being
>located.
>
>Here's my current take on a reasonable way to run ZServer:
>
>(BTW, later Zope installation will write these files for you.)
>
>shell script 'start':
>#!/bin/sh
>PYTHONHOME=/path/to/my/Zope
>export PYTHONHOME
>cd $PYTHONHOME
>bin/python ZServer/start.py
>
>Here are snippets from start.py which makes sure the Python path is
>reasonable.
>
>start.py:
>...
>ZOPE_HOME='/path/to/my/Zope'
>...
>PID_FILE=os.path.join(ZOPE_HOME,'var/Zope.pid')
>LOG_FILE=os.path.join(ZOPE_HOME,'var/ZServer.log')
>...
># set python path to include Zope stuff
>sys.path.insert(0,os.path.join(ZOPE_HOME,'lib/python'))
>...
>
>So, in summary:
>
>* set the PYTHONHOME environment variable
>* set Zope's lib/python directory in your Python path
>
>Hope this helps.
>
>-Amos
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>