ZPT Was: Good XML tools?

A.M. Kuchling akuchlin at ute.mems-exchange.org
Wed Jul 31 09:05:21 EDT 2002


In article <3D47C373.4040805 at thomas-guettler.de>,
	Thomas Guettler wrote:
> I programmed with ZPT, but I switched back to generating HTML
> with pure python:
> 
> Example: (ignore the german words)
>      def editListsForm(self, REQUEST):
   ...

Quixote's PTL lets you make it slightly simpler, because you don't
need the res.append() calls and the ''.join() at the end; compiler
wizardry takes care of that for you.  You lose the ability to have
docstrings, though, which is a minor tradeoff.

In PTL your example would be:

      template editListsForm(self, REQUEST):
	  self.standard_html_header()
          '''
           <form action="editListsAction">
            <b>Projekte:</b>
            Bitte wählen Sie die zu löschenden Projekte aus: <br><br>
            %s
            Hinzufügen eines neuen Projekts:
            <input type="text" name="new_projekt">
            <br>
            <input type="submit" value="Ausführen">
           </form>''' % (Utils.keywordInput('del_projekt',
                         self.defaults.GRS.grs_projektList())
          self.standard_html_footer()

--amk



More information about the Python-list mailing list