[Zope] Product event when zope restarts

Tino Wildenhain tino@wildenhain.de
Thu, 10 May 2001 18:34:05 +0200


Hi Jan,

With python, you can override subobjects access.
For example, you can give your class a
__getattr__() method to call a function every
time an attribute is accessed.

HTH
Tino Wildenhain
PS: the other approach would be to send the file each
time it is generated into zope from the application
which generates the file

--On Donnerstag, 10. Mai 2001 17:44 +0300 Jan <jan@itmeedia.ee> wrote:

> That is a very good idea, only there seems to be no function where I could
> do so..
> The properties of my product are accessed directly like <dtml-var
> "myProduct.property1"> so no function is executed. The getProperty is only
> executed when watching the property list. :(
>
>> what about using stat() on the file to check if it has changed and
>> reread in that event? Make sure you reread only for the current
>> access.
>> > Yes. As I wrote, the product BASICALLY does this. Actually it reads the
>> > file, parses it and shows it's contents in the properties tab. When I
>> > write something like <dtml-var "myProduct.property1"> then I can access
> a
>> > part of the file.
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )