Writing a simple python web app

Michael Torrie torriem at gmail.com
Sat Sep 11 16:22:55 MDT 2010

On 09/11/2010 03:40 PM, Dave Smith wrote:
> What do you recommend?

There are a number of smaller web frameworks like web.py.  There was a
project to make an interpreter that worked with files formatted like you
would in PHP called Python Server Pages.  That kind of mixing of code
and html has fallen out of favor, though, so PSP is no longer being
developed.  Of course you can just print html code to stdout like CGI
scripts have always done.  anyway:

Python obviously doesn't know anything about web servers, etc.  So
you'll need a mechanism for doing this.  mod_python is one such
mechanism.  Or you could go with a straight CGI script.  The latest
technology seems to be WSGI.  I believe there is a mod_wsgi that brings
wsgi to apache.  My web guys have used all three methods at different
times to get web apps written in python live.

In many ways, life is much much better in Python (Django works really
really well for us), but Python doesn't have the inherent web tie-in
that PHP has--which is probably a good thing.  Things do seem more
complicated as well (a la J2EE), but not overly so.

The only one I've ever used is Django, and it's quite nice, even for a
small pet project.

More information about the PLUG mailing list