[Baypiggies] Output generation - (string operations/triple quote/template)

Bob Ippolito bob at redivi.com
Wed Feb 14 07:40:05 CET 2007


On 2/13/07, jwithers <grayarea at reddagger.org> wrote:
>
> > I agree with JJ that template language is another good alternative,
> > especially for more complex generation. While this is subjective and
> > everyone have different criteria, I consider the approach of interleaving
> > Python code with the target output hard to maintain. It goes back to the
> > Java Servlet approach and the many addon projects later to provide better
> > alternatives.
>
> > Wai Yip
> >
>
> I have found TAL to be good for taking care of that. Templates, but you
> are close to forced to move your code outside the templates. Most people
> don't seem to like it much, but it makes me happy.  Most of Zope gets on
> my nerves in one way or another, but TAL makes for better separation
> than the majority of templating systems, and avoids the ugly of building
> your html inside your code.

Genshi offers the same paradigm as TAL but uses Python syntax and is a
bit friendlier to those who want to put code in templates. It's a
pretty good middle ground in my experience.

-bob


More information about the Baypiggies mailing list