[Zope] Reimporting products without restarting server

Michel Pelletier michel@digicool.com
Wed, 08 Mar 2000 19:29:23 -0800


Chui Tey wrote:
> 
> Having a slow machine, not having to restart the server when testing is
> important for me (it is a 20 second start up for me).
> Is there a script around to let me do this... ?

No, sorry.  Python has a 'reload()' built-in, maybe that could be
explored, I really don't know enough about it.
 
> Here is what I have done so far (using bits of snippet from the source):
> 
> log into the monitor, and do this:
> 
> import Zope
> app = Zope.app
> c=app()
> OFS.Application.initialize(c)

Aiee!  This method was never meant to be called more than once.

> c._p_jar.close()
> del c
> 
> The net result is all items in the the "Add New Item" combobox double up,
> and I am not even sure if this does the trick...

or any other non-visible side effect it may have.  I would recommend
meditating on the Zen of Zope between restarts.

-Michel