Web development with Python 3.1

Dotan Cohen dotancohen at gmail.com
Fri Oct 30 16:56:47 EDT 2009


> I took a look a both yesterday. They are both generic text templating
> systems that seem to pretty much do the same thing. I suspect you will
> prefer Mako since it avoids duplicating Python's comtrol structures. But I
> think it worthwhile to look at both anyway since doing so will help to
> separate the concepts from the particular implementations.
>
> My take on them is this: when text mixes code that is meant to be
> interpreted and text data meant to be taken literally, some means must be
> devised to distinguish the two. In programs files, the code is left unquoted
> and the text data is quoted. In template files, the marking is reversed: the
> literal text is left unquoted and the code *is* quoted. In Mako, expressions
> are quoted with braces ({...}), single statements with '%' prefix, and
> multiple statements as well as Mako tags with <% ...>.
>

Thanks, Terry, that should save me some time.


-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il



More information about the Python-list mailing list