[Tutor] mod_python, mod_wsgi, web.py, django! What to use?

Chris Babcock cbabcock at asciiking.com
Mon Sep 29 06:13:46 CEST 2008

> So, lets say I want to develop a distributable web application (such
> as phpBB or Drupal) for Python. What platform (mod_wsgi, mod_python)
> would I use to reach as many users as possible, and on top of that,
> which (if any) framework should I use to develop this web application?

A lot of applications run on Apache with mod_wsgi or mod_python or as
stand alone applications with or without mod_proxy. For my own
environment, which usually involves some static pages and PHP apps, I
prefer mod_wsgi. If you go the framework route then your application
should end up being agnostic to this detail of the deployment.

I happen to like the TurboGears 2 framework. It implements Pylons with
a number of sane choices in the development environment. Using the SQL
Alchemy ORM means that I define my data in Python and call the mapper
instead of defining both a Python data structure and an SQL schema.
Where portability is an issue Alchemy takes care of it transparently.
Genshi is the default template engine for TG2. The performance is
adequate for me and that choice allows me to have non-Pythonista
friends work on the user interface.

> Also, what are some popular python web applications (forums, cms)
> that I could take example of? What did they use?

They used PHP. :-/

I think that Python suffered for a while because it was too easy to
write frameworks. For a long time it was a truism that there were as
many Python frameworks as developers. I think that made Python an
inconsistent performer for web applications, but mod_wsgi makes Python's
relative performance under Apache compared to other web scripting
languages a non-issue for the first time.

> What is currently lacking in Python's web application selection?



In Python e-commerce, the only significant player is Satchmo. There's
an alpha release for a plug-able CMS built on TG2 due for release next
week. I'd love to see an e-commerce plug-in.



Make a difference in the world and support more Diplomacy projects and
services then you can shake a dagger at, please read:

 - or - 

Blue Goose is willing to give me $250 to support various services and
projects in the Diplomacy hobby. The blog post above will tell you why
they are doing this, what I will do with the money, and what you can do
to help me get it.

More information about the Tutor mailing list