HTML Generation

Mike 42flicks at
Fri Apr 3 09:04:04 CEST 2009

Hello all,

I'm writing a web app and wanted to do some html generation (I really do not
like to maintain or write html).

I'm thinking of writing a dsl based on the following:

def html():

def a():

def body():
...(head, (style, "id", {"font-color":"black"}))
...... (a, "id", {"title":"bla"}, ("link title","")),
......(p, "paragraph text")
...... )

And then parsing the resulting list. (the specification of sorts is as far
as I've got) I'd have to create the list as a string and then call a method
which executes the contents as the methods would not be in the local scope.

The reason I'm posting is I'm curious what people think, I've been starting
to perfer this style and am curious if a similar solution exists or if this
is a good idea :)

I'll proberly finish it as a learning experience regardless.

I appreciate any responses :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list