ZPT : return a string HTML from a script python
Marco
marcominutoli at supereva.it
Fri Apr 5 04:17:58 EST 2002
I have a ZPT and I want to print an HTML string (it's arrive from a
script python) inside it.
This is a piece of ZPT code that call the script "pyPrint"
-- <span tal:content="python:here.pyPrint
-- (folder=request['folder3'])">
-- </span>
This is a script
-- message = "Result: <br>"
-- for folder in folder:
-- folder=container.pyString2list(string=folder.id)
-- rootFolder = container.restrictedTraverse(['',]) # container
-- folderDaCancellare = rootFolder
-- folderPadre = None
-- for item in folder[1:]:
-- folderPadre = folderDaCancellare
-- folderDaCancellare = folderDaCancellare[item]
-- message = messaggio+folderDaCancellare.id
-- if folderPadre != None and
len(folderDaCancellare.objectValues()) == 0:
-- folderPadre.manage_delObjects(folderDaCancellare.id)
-- message = message + " cancellato<br>"
-- else:
-- messaggio = message + " non cancellato<br>"
--
-- return message
I want that the <br> tag will become a new line in ZPT page.
Sorry for my english
More information about the Python-list
mailing list