[Zope] Re: Recursive Python Call in Zope
Christopher Baumbach
chrizmo_zopeList@gmx.de
Tue, 19 Nov 2002 14:13:05 +0100 (MET)
I think I caught my problem...
the script()-call was not printed, so I didn't see the return-value...
C.
> OK, here's my Script:
>
> ------------------------
> #Args: obj=None, indent=0 (for the view)
>
> >from Products.PythonScripts.standard import html_quote
> request = context.REQUEST
> RESPONSE = request.RESPONSE
>
> if obj is None:
> obj=context
>
> folders = obj.objectValues('Folder')
>
> if len(folders) > 0:
> for i in range(len(folders)):
> folder = folders[i]
> ind = " " * indent
> subfolders = folder.objectValues('Folder')
> print ind + folder.id
> if len(subfolders) > 0:
> script(subfolders[0], indent+1)
>
> return printed
> ------------------------
>
> ...it's not very complex - maybe I have to do more Python-practice ;-)
>
> thanks for help,
>
> C.
>
>
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!