[Zope] How to get an object in a folder using its id!!!!

Andreas Pakulat ap125@informatik.uni-rostock.de
Fri, 20 Jun 2003 20:35:02 +0200


On 20.Jun 2003 - 17:05:18, saravanan  annamalai wrote:
> Hi...
>     It may seem to be a new bie question...  I am trying to get the items which are in published state in folder_delete.py....
> 
>    Have anybody done this already...
> 
> otherwise can someone help on this....
> I have list of ids....I want to get objects of those ids.....so that i can check for their review_state....
> 
>    I did using context.restrictedTraverse(id)...but i cant access the property.....Does this method return the object of that id

That assumes the objects you wan't are in the folder on which the script
is called?! Ok, then I would do:
getattr(context, id)
which delivers the correct Object.

Andreas

-- 
You have the body of a 19 year old.  Please return it before it gets wrinkled.