[Zope] question about products

Dieter Maurer dieter@handshake.de
Mon, 25 Nov 2002 19:44:44 +0100


Juan.Garcia.Arboleya@esa.int writes:
 > I am writing a zope product (first time) and I would like to know if it is
 > possible to test it without running Zope.
Yes, in some restricted way.

Assume, your Zope is not running (your "var/Data.fs" is not in use),
then you can activate Zope in an interactive Python interpreter like
this:

	python
	>>> from Zope import app
	>>> rootObject= app() # this is Zope's root object

>From the rootObject, you can access all the other content in your site.
You must extend PYTHONPATH for the above in order that the "Zope"
package is found by Python's import machinery.

On

  <http://www.dieter.handshake.de/pyprojects/zope>

you find a small module "interactive debugging support".
It allows you to create an HTTP request and traverse it in
the same way, ZPublisher would do.

When you have a little money, you can look for WingIDE.
It helps you a lot to develop your Zope products.


Finally, you may activate Zope logging (see "doc/LOGGING.txt").
Most errors should go into the log file (if logging is enabled).
Only stupid code writes in this case to stderr.


Dieter