[Zope] Zope Product Debug Cycle..

Chui Tey Chui.Tey@env.qld.gov.au
Fri, 01 Oct 1999 16:15:29 +1000


My current Zope Product Debug Cycle:

Pythonwin: verify no syntax error
Start Zope (using start.bat etc)
View the traceback on product if product broken
Stop Zope.
Repeat.

This is painfully slow. (akin to bad old days of compile,test, debug,
code ...)

Is there a better way?

I have been experimenting with:
Start Zope (using start.bat etc)
Start monitor_client
  Pythonwin: verify no syntax error
  import/reload Product.myproduct
  instantiate class
  try to perform myfolder._setObject(id,instance)
  View the traceback on product if product broken
  Check product through browser
  Repeat.

This is somewhat faster. 

Third option: never tried this...
Create classes in Python
Then subclass these classes but make them inherit from Zope's classes as
well. (Kind of like wrapping my class with Zope)
Then pray and debug...

Fourth option:
Find an existing Zope product which does similar actions (say SQL or
whatever) and then see jack hack. hack, jack, hack. This is pretty good
because it catches little things like doc strings required for methods
to be published et c.

(The fourth would be a good one if a cheat sheet is made up and we all
can cut and paste)

How do the zope experts do their Product development. Is there anyway we
can reload a product module when Zope is running?

Chui