[Zope] Re: Recursive Python Call in Zope

Maik Jablonski maik.jablonski@uni-bielefeld.de
Tue, 19 Nov 2002 14:38:46 +0100


Hi,

just another one, which solves your problem...

##parameters=obj=None, indent=0

if obj is None: obj=context

print "%s%s" % (' ' * indent , obj.getId())

for folder in obj.objectValues('Folder'):
     print "%s%s" % (' ' * indent , folder.getId())
     for subfolder in folder.objectValues('Folder'):
         print script(subfolder, indent+1),
return printed

-mj
-- 
Maik Jablonski                 __o
www.zfl.uni-bielefeld.de     _ \<_    Deutsche Zope User Group
Bielefeld, Germany          (_)/(_)               www.dzug.org