Hi Christoph,
> Another thing I am missing is a html/xml library, i.e. a core support
> for generating html and xml code with Python.
>
> E.g., instead of
>
> self.writeln('<a href="http://xyz">abc</a>')
>
> you should be able to write something like
>
> self.a('abc', href="http://xyz")
I think you are looking for the SimpleHTMLGen.py from FunFormKit module:
SimpleHTMLGen.py
5 Oct 2002
Ian Bicking <ianb@...>
Kind of like htmlgen, only much simpler. The only important symbol that
is exported is ``html``.
You create tags with attribute access. I.e., the "A" anchor tag is
html.a. The attributes of the HTML tag are done with keyword
arguments. The contents of the tag are the non-keyword arguments
(concatenated). You can also use the special "c" keyword, passing a
list, tuple, or single tag, and it will make up the contents (this is
useful because keywords have to come after all non-keyword arguments,
which is non-intuitive).
Regards,
--
Michel Thadeu Sabchuk
Curitiba - Brasil
|