Separation of Code in CGI App

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sat Jul 23 05:49:42 EDT 2005


Rob Cowie a écrit :
> Hi,
> 
> I need to create a planner/calendar system using python cgi scripts. It
> is my first CGI app (beyond a few tutorial examples).
> 
(snip)

You may want to have a look at the cgi_app mini-framework:
-> http://thraxil.org/code/cgi_app/

It's a port of a Perl framework, and it has some unpythonic flavour in 
some points (but that can be easily corrected), and it can work with CGI 
and mod_python. It's quite easy to get started with, and the source 
being really small (about 1kloc IIRC), it's quite easy to customize to 
your own needs (I rolled my own mod_python-only/SimpleTAL-only version 
in half a day...).

You also have the choice between 2 template systems, one that's dirty as 
can be IMHO (htmltmpl) and one that is quite nice (SimpleTAL). The only 
wart with SimpleTAL is that it requires every input to be unicode, but 
that's easy to solve also (I wrote a wrapper class that handle this 
quite transparently - it's still Q&D but works well so far, I can 
publish it if anyone is interested).

My 2 cents



More information about the Python-list mailing list