for web application development

Evan Klitzke evan at yelp.com
Thu Jun 14 12:16:08 EDT 2007


On 6/14/07, james_027 <cai.haibin at gmail.com> wrote:
> My problem is looking for a web framework for python, that could
> provide a natural way of developing web app. I am avoiding to learn
> template language as much as possible.

You should definitely reconsider avoiding templates -- it's hard to
imagine building a reasonably large webapp that didn't use them at
all. Cheetah templates are a really, really good Python framework for
writing templates, and the templates themselves that can use
Python-like constructs, which make them pretty powerful.

The standard way to do web programming in Python would of course be
using something that ties into mod_python, but WSGI[1] has been
brought into the language as of Python 2.5. Between Cheetah templates
and the WSGI modules, you can put together a simple lightweight web
framework in a couple hundred lines (or less) of Python. For my own
personal website I threw together a really simple Python "framework"
that runs as a daemon and uses WSGI and Cheetah templates, and it all
ended up being only 150 lines of code, so I think this is a fairly
good solution if you don't envision a huge/complex site. If you want
to build a a much bigger site you should obviously look into the other
frameworks that are available, particularly Django.

[1] http://www.python.org/dev/peps/pep-0333/

-- 
Evan Klitzke <evan at yelp.com>



More information about the Python-list mailing list