[Zope] How to reference an object under a given folder

Andreas Jung lists at zopyx.com
Thu Sep 7 05:37:50 EDT 2006



--On 7. September 2006 17:33:45 +0800 "Sinang, Danny" 
<D.Sinang at spi-bpo.com> wrote:

> Hello,
>
> I want to reference an object named "Es" found in the directory
> /apps/wms .
>
> I'd normally create a script in /apps/wms and issue the command obj =
> getattr(context,"Es") .

Here you're using acquisition.
>
> But how do I do so from a script located elsewhere ?
>

E.g. through traversal: context.restrictedTraverse('/path/to/object').

-aj


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060907/af7abc11/attachment.bin


More information about the Zope mailing list