Inserting Python commands into HTML documents

Fidtz fidtz at
Wed Apr 16 18:25:29 CEST 2003

Em <mcclaine at> wrote in message news:<zpqdne0Kztcb0AejXTWcow at>...
> Hello,
> I am an extremely new member of the Python family. I had a job interview 
>   where they charged me with the task of creating a (fake) corporate 
> website using Python in ten days--with two left now.
> The problem is that what I have read seems to say Python is a CGI 
> language... Am I remiss in believing that my website is going to be 
> completely run from inside a couple .PY files in the CGI-BIN?
> Is there a way for it to act more like PHP, as in run Python commands 
> from inside the (index|contacts|about|etc).html or at least simulate 
> that behavior? (This is on a linux server and I am not to use PHP, FYI.)
> Thank you all for any assistance!

If you only have 2 days and are lacking install options (from your
other posts), I would suggest cubictemp , a tiny templating system
from nullcube. It consists of one .py file that can live in your

It is very simple so you will be able to understand it in a few
hours,if that, and get on with the web design bits. You'll have to
design within it's limitations (don't go hog-wild with conditional
formatting basically). In two days you probably have to get the DB
connections sorted , the graphics done etc. etc. A simple but clean
looking design would be the best bet under the time pressure anyway
IMHO. I use it all the time as the simplicity suits me :)


More information about the Python-list mailing list