On 1/27/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote at 2006-1-27 16:42 +0000:
> > ...
> >But, in that example they are using Five and I'm not. I've just got a
> >Zope 2.9 install and a python product that I started on before Five
> >even existed. Does that give us any hope for non-Five python products?
> >Anybody?
> I cannot believe that they were able to break refreshability
> of "normal" (non Five) products.
> Refreshing essentially works by removing the modules belonging
> to the product from "sys.module" and then reimporting the product.
Ok. Still quite clueless on how to debug it. I'll see what I can do
with some greps and various print statements.

> This may fail when product defined objects are held in registries
> (such as adapters) and are not overridden when the product is
> reimported. Maybe, such cases occur often with Five.
> Without Five, it is rather rare (product objects are often registered
> but usually, the reimport overrides the old no longer working entries).
> >I've tried pressing the little "Refresh" button in Control_Panel and
> >sure enough, the product is reloaded (I put some print statements in
> >the .py file) but not refreshed.
> "reloaded but not refreshed" means what?
Suppose my code looks like this::

 class MyProduct(Folder):
 print "class MyProduct has just been reloaded"

Then I start zope with ./bin/runzopt, debug-mode off, make a change in
the product and press the Refresh button in the Control_Panel and
notice how it prints
'class MyProduct has just been reloaded' to stdout but the change I've
made does not happen. A quick restart of Zope makes the change happen.
That's what I meant.

Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to