[Zope] Editing downloaded + installed product?

Michel Pelletier michel@digicool.com
Thu, 21 Oct 1999 16:04:19 -0400


> -----Original Message-----
> From: Thomas B. Passin [mailto:tpassin@mitretek.org]
> Sent: Thursday, October 21, 1999 3:16 PM
> To: zope@zope.org
> Subject: Re: [Zope] Editing downloaded + installed product?
> 
> I'm having the same problem using Python code as an external 
> method.  The
> trouble is that when you change the code and rrun it, the 
> Python interpreter has
> continued to run all the while (since it is running ZServer). 
>  It thinks that
> all your code has already been bound to the existing method 
> and class names you
> defined the first time you ran the code, and it doesn't 
> realize there have been
> changes.

If you click on an external method, and click 'Edit' Zope will reload
the method.  Further, if you run Zope in debug mode (-D in z2.py)
external methods will reload every time they are called.

> On the other hand, those reload() calls would take time to 
> execute, so it should
> be possible to remove them for the production system easily 
> and without ill
> effects.

In python, you can simply sniff the Globals model for 'DevelopmentMode'
equalling a true value.  If it it's true, do something debuggish (like
call reload).

-Michel