Python for CGI scripting?

Gerhard Haering gerhard.haering at gmx.de
Mon Aug 5 12:05:42 EDT 2002


Dale Strickland-Clark wrote:
> I've already played with this for low-volume applications and it works well.
> 
> We're now designing web systems which will have much higher hit rates.
> 
> My concern is that the Python EXE is loaded afresh for each CGI execution.
> Concurrent hits on the site is going to result in multiple instances of the
> Python interpreter.

That's not the main problem. The main problem is that importing modules is
expensive. Especially for some modules like sgmllib, or the xml stuff and if
you want to connect to a database, you need to establish a new connection for
every hit.

Of course, alternatives exist. Tons of them:
http://www.python.org/cgi-bin/moinmoin/WebProgramming

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list