I am afraid not. You will only be able to get at the URL parent, which may or may not be the same as the physical container. From OFS/ZDOM.py def getParentNode(self): """The parent of this node. All nodes except Document DocumentFragment and Attr may have a parent""" return getattr(self, 'aq_parent', None) Stefan On Freitag, Mai 16, 2003, at 22:10 Europe/Vienna, Dieter Maurer wrote:
Thierry FLORAC wrote at 2003-5-16 14:38 +0200:
On Friday 16 May 2003 10:33, Geir Bækholt wrote:
On Fri, 16 May 2003 08:55:23 +0200 GMT (..8:55 where i live(GMT+2) ) Wim Bekker asked the Zope mailinglist about the following:
WB> How can I obtain the 'parent' object in Zope with python (script)?
myparent = object.aq_parent
Hi,
Maybe I'm wrong, but I've read here and there that the correct syntax should be :
parent = object.aq_inner.aq_parent
"aq_inner" is protected, you cannot use it in TTW code.
"getParentNode" (suggested by someone else) may work (though I am not sure).
Dieter
-- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/