Using just the Mako part of Pylons?
mario at ruggier.org
Sat Jun 28 13:15:00 CEST 2008
You would need a controller of some sort to connect the web request/
response with your template handling. This is the key task of the web
application layer. This is also the area that WSGI atttemps to
standardize in so far as making the basic objects framework
independent. You can thus supply a generic wsgi app to act as your
controller... see wsgiref package docs. Or, you can of course use any
app framework of your choice.
But, as a small, ultra-lightweight templating system that can be used
in a web context or as standalone, you should really take a look at
Evoque Templating: http://evoque.gizmojo.org/
All the power of any fully featured text-based templating system and
then some (no constraints on template file names or formats,
restricted execution, automatic XSS protection, ...) while being also
incredibly fast. And the simplicity of the system means you can learn
it really quickly, and remember it...
Btw, you may be interested in a small example of wsgi based app that
uses evoque -- one of the examples of how to use evoque under various
More information about the Python-list