[Zope] dtml-in equivalent in pythonscripts ?

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Fri, 8 Mar 2002 22:19:36 +0300


On Fri, Mar 08, 2002 at 11:43:07AM +0100, Joachim Schmitz wrote:
> how would I do that ?
> 
> >> <dtml-in "objectValues('Folder')" sort=sequence skip_unauthorized>
> >> in a python script ?
> >>
> >> do I have to program the "sort", and "skip_unauthorized" explicitly ?
> >
> >    I am afraid you do. You can use extended sort support (by importing it
> > from DTML), but you have to skip_unauthorized yourself.

   Something like that:

for folder in context.sequence.sort(objectValues('Folder'), ('sequence',)):

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.