a way to keep the Python interpreter in memory?

Oleg Broytmann phd at phd.russ.ru
Tue Sep 19 11:22:03 EDT 2000


On Tue, 19 Sep 2000, R. A. wrote:
> As a rank newbie, I was unable to provide a confident answer to the
> following question posed by an associate coding on the web team at a
> major corporation who has been patiently hearing me out about Python. 
> Is there a way to do what he's looking for?
> 
> "When you have apps running on a webserver, a Perl application requires
> the perl interpreter (perl.exe in Windows) to be instantiated every time
> a perl script is called.  Java servlets, however, do not as the JVM
> (java.exe in Windows) is always in memory, thus making execution much
> faster.  When Python is attached to a website, does it function like
> Perl or the JVM?  Meaning is a Python interpreter kept in memory at all
> times?"

   By default, Python do not stay in memory. But you can use different
techiques to run Long Running Process (either Perl or Python). The best
known mechanism is FastCGI - www.fastcgi.com.
   PersistentCGI (http://starship.python.net/crew/jbauer/persistcgi/index.html)
is the same idea with different protocol; it is python-only solution.

   You can also explore other, non-CGI mechanisms, so called "web
application servers". For python-based solution look Zope (www.zope.org).
There are, of course a number of Perl-based servers.

Oleg.
---- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list