Question about long-running web scripts

Gilles nospam at nospam.com
Thu Oct 25 08:40:56 EDT 2012


On Thu, 25 Oct 2012 13:03:14 +0100, Tim Golden <mail at timgolden.me.uk>
wrote:
>(Your question is a little confused at the end. I'm choosing to
>understand: why can't we just run Python one-shot, like CGI? The likely
>alternative meaning is: why can't the incoming request be routed to an
>already-running Python program -- which is not, of course, what CGI
>generally does. Hence my confusion).

Yes indeed. Sorry about the confusion.

But actually, I didn't mean one-shot scripts, where the Python
interpreter + script must be loaded each time, but rather: If I leave
a Python running in an endless loop, why not just use either CGI or
some other basic way to call the script instead of FastCGI?

In the case of PHP, FastCGI makes sense, but I don't see the benefit
for long-running Python scripts.



More information about the Python-list mailing list