Python module for CGI programming...

Alex Martelli aleaxit at yahoo.com
Tue Aug 29 08:28:49 EDT 2000


"¼­ÁØ¿ø" <linuxqna at chollian.net> wrote in message
news:8og5kl$a08$1 at news1.kornet.net...
> I know Python Module for CGI programming
> ...mod_python, Pyapache, PMZ, fastCGI.....

None of these are needed for CGI programming; you
can do CGI programming with Python as it comes "out
of the box", and it works just fine (particularly
with the cgi module in the standard Python library,
but you don't even _have_ to use that one).

These are all approaches you could use *instead*
of CGI, if you wanted.


> Which module is good for CGI Programm?
> Speed, Scalebility, Process model....

I have no idea about the various Apache-specific
modules -- somebody else will have to cover that.

FastCGI has an advantage of simplicity and, at
some level, portability (there are FastCGI modules
for non-Apache servers, such as Netscape's and
Microsoft's, though I think they're $$$); on the
other hand, I don't think it lets you do quite as
much as the Apache-specific modules, but, rather,
'just' serve incoming requests (much like CGI, but
with potential performance benefits since you won't
pay startup-costs per every incoming request).

It's easy to write a FastCGI-compliant script and
run it under normal CGI -- it will just see a
rather short 'sequence' of just one request.  If
you do that, you can then actually install FastCGI
only if/when needed (and you can still move your
stuff to other servers without FastCGI installed,
paying at most a performance penalty); I don't think
the Apache-specific modules give you that flexibility
in development/deployment.  FastCGI and Xitami's
LRWP are close enough that it's easy to cover both
in a single script (just comment/decomment a couple
of lines:-), which may be another advantage if in
some cases you prefer Xitami's light-weight, easy to
administer, little server, to more powerful & rich
Apache.


Alex






More information about the Python-list mailing list