[Zope] Working with TransientObjectContainer

Gilberto Gil Pereira ggsfp@students.fct.unl.pt
Thu, 27 Jun 2002 11:49:58 +0100 (WEST)


Hi all!!!

I'm working on a project that uses Zope (2.5.0) , but most of the work is=
=20
done in Python (currently 2.1).

The thing is that I'm trying to use the Python's class Transience to crea=
te a=20
transienteObjectyContainer that calls a method each time an object=20
contained in it (mostly session objects) expires. The docs say that I can=
 do=20
this by defining a 'delNotification' when I create that object. So far so=
=20
good...
But when a call the class __init__ with an callable method, it is=20
executed in compilation time, which means that the method is executed=20
right away, insted of being executed when the object expires. I=B4ve also=
=20
tried to pass that method as a string (path+method_name), but Zope asks=20
for the Zope path, and not for the FS path that is used in Python.

I'm sure I'm missing the big picture here, so if there's anyone out=20
there that knows how i can do this, it would help a lot :)

Cheers
Gil
=09