webpages in python

François Pinard pinard at IRO.UMontreal.CA
Thu May 4 23:11:53 EDT 2000


root <jc23 at swt.edu> writes:

> I have already created webpages in HTML.  Now since python is hot
> nowadays I would like to make my site dynamic using python.
> Where can I get the starting tutorials for creating webpages in python
> or some similar help.

I just made a few such HTML pages (quite a few, to be fair to myself! :-).
Visit my Web page from the signature, select any project, then from the
left margin, pick either `Browse' or `Folders'.  All the pages from these
two buttons are produced through Python scripts.  Let me use `recode'
for an example.  When you click `Folders', it executes:

   http://www.iro.umontreal.ca/contrib/recode/web/babyl.cgi.in

(with the @topdir@ substituted by some Makefile), which is merely a short
trampoline, written in Python.  The real work is done through:

   http://www.iro.umontreal.ca/contrib/recode/lib/config.py
   http://www.iro.umontreal.ca/contrib/recode/lib/babylweb.py
   http://www.iro.umontreal.ca/contrib/recode/lib/htmlpage.py

and also relies on an HTML template file (for the margins and such) in:

   http://www.iro.umontreal.ca/contrib/recode/web/layout.html

`babylweb.py' transform Babyl files or messages into HTML, it requires
`htmlpage.py' to merge that produced HTML into a common layout.  The short
`config.py' holds the few definitions specific to each project, which are
also referred to from the layout.

I did these to get started fast, and it gives me a lot of results for
a rather small investment, which is quite satisfying so far.  However,
it does not look unlikely to me that I'll throw these things out once if
I ever learn Zope -- something to do when I'll be grown up enough :-).

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list