Design questions (cgi programming with python)

Miki Tebeka tebeka at cs.bgu.ac.il
Thu Dec 26 10:05:37 EST 2002


Hello Paul,
> ---------
> #!/usr/bin/python
> print "Content-type: text/html\n\n"
> 
> print """
> <html>
> ....
> </html>
> """
> #(^^^that is always re-done when the html form is processed....)
> 
> import cgi
> .....

Don't write your HTML by hand. Use HTMLgen
http://starship.python.net/crew/friedrich/HTMLgen/html/main.html
Make sure document cgi flag is 1 and you're all set to go.

HTH.
Miki



More information about the Python-list mailing list