On Thursday 15 January 2004 03:11, Graham Fawcett wrote: > Here's a little toy for your amusement. On comp.lang.python today, I > discovered that Twisted is building a next-generation templating system, > called Nevow (a wordplay on "Woven", their earlier system, and "nouveau"). > > This is what Nevow template code looks like. It's valid Python, though it > looks more like an S-expression: > > document = html[ > body[ > form(action="")[ input(type="text", name="name") ], > ] > ] > Speaking of s-expressions here's a lisp version which looks similar http://opensource.franz.com/aserve/aserve-dist/doc/htmlgen.html but lisp is old-hat right? ;-) > Sneaky tricks with __call__ and __getitem__ are used to pull off this feat > of syntactic sugaring. More (and better) examples can be seen at > > http://stewstuff.com/doc/nevow.xhtml > > > I wrote a little Nevow implementation, just so I could see what the system > felt like. It's a toy, of course, but I thought you might enjoy playing > along. Thanks for that. I'll give it a try. Jon