[Zope] - Using ZPublisher (Bobo) alone
Amos Latteier
amos@aracnet.com
Wed, 06 Jan 1999 09:44:40 -0800
At 04:27 PM 1/6/99 +1100, Chris Wright wrote:
>I would like to use ZPublisher alone (having had some success with Bobo)
>under linux.
>
>I can't find installation instructions for ZPublisher. I've got the
>whole Zope thing up and running from the source, but I'm not sure what
>to do if I just want to do Bobo things....
>
>Could some kind soul point me at the FM?
If you've used Bobo before you can continue in the same way you have, with
the exception that instead of calling 'cgi_module_publisher.publish_module'
to publish a Python module, you call 'ZPublisher.Publish.publish_module'.
You may need to update your publishing machinery to call the correct
publishing function.
We're working on better documentation and packaging to allow you to use
Zope components such as ZPublisher separately.
If you haven't used Bobo before and you want to find out about ZPublisher I
recommend these two tutorials which were originally for Bobo, but have been
updated for Zope:
http://www.zope.org/Documentation/Reference/ObjectPublishingIntro
http://www.zope.org/Documentation/Reference/Trinkets
OK, so now you understand object publishing, and have a Python module that
you want to publish with ZPublisher. What next?
In order to use ZPublisher you need to decide on a publisher--PCGI,
ZopeHTTPServer, CGI, etc. Probably the easiest way to go is to use
ZopeHTTPServer. Just invoke it on the command-line like this:
ZopeHTTPServer.py myPublishedModule
That's it.
For more information on how to use ZopeHTTPServer see its doc string. Or
read the doc string on the web:
http://www.zope.org/Documentation/Reference/ZopeHTTPServer
PCGI works the same way it always has. Setting up PCGI is more complex, so
I'll just give a pointer to the docs here:
http://www.zope.org/Documentation/Reference/PCGI
If you are interested in plain old CGI, we do not currently have a blessed
method of publishing. However, I hope to change that soon--keep your eyes
peeled.
If you really want to do CGI right now, all you basically need to do is
write a CGI program that looks like this:
from ZPublisher.Publish import publish_module
publish_module("MyPublishedModule")
You can get fancier, but that's the essential part right there.
Hope this helps.
-Amos