Python CGI Scripts

Mark Nottingham mnot at pobox.com
Sun Aug 15 02:40:26 EDT 1999


Well, there is the cgi.py module, which is basically form parsing, etc. For
HTML formatting, you can use HTMLgen, which I think is what you probably
have in mind. See the contributed modules section of www.python.org

I'd suggest considering using a template class as well; IMHO, mixing HTML
and a scripting language is a bad idea, from a code maint / readability
standpoint (whether it's HTML in CGI, like this, or something like ASP/PHP).

More generally, yes, a lot of people use Python for CGI. Between cgi,
htmlgen, htmllib, urllib and httplib, there's pretty much everything you
need.


Cheers,



> I'm just getting into python really, and being a perler for a couple of
years
> I've gotten it to do just about everything I've ever needed for SA'ing. As
I
> thumb through 'Programming Python' it looks like just about everything
that can
> be done with perl can be done with python.
>
> But... have a lot of people adopted python as their new cgi language? This
is
> what I do primarily lately and I found only one program in the book called
> 'cgimail.py'. As I read through the code I notice that the h1 tags, the
form,
> the header infomation, etc etc are all being 'print'ed manually. Is there
no
> nifty CGI.pm equivelent in python?






More information about the Python-list mailing list