Python as a Server vs Running Under Apache

mojosam zjw1hu702 at
Sun Jan 1 17:44:07 EST 2006

I guess I'm a little confused, and this certainly comes from not yet
having tried to do anything with Python on a web server.

I remarked once to a Python programmer that it appeared to me that if I
had a web page that called a Python program, that the server would:
1. Load Python
2. Run the program
3. Unload Python

Then the next time it has to serve up that page, it would have to
repeat the process.  This seems inefficient, and it would slow the site
down.  The programmer confirmed this.  He said that's why I should use
mod_python.  It stays resident.

Is this advice accurate?  Are there other things to consider?  Isn't
there just some way (short of running something like Zope) that would
keep Python resident in the server's RAM?  This is a shared server, so
the web host probably doesn't like stuff sitting around in RAM.

Right now, I only need small programs to run.  E.g., I'm thinking of
embedding a Live Journal blog in my web page.  Live Journal gives you
several ways of doing this, one of which is three lines of Python code.

Ron Britton

(This email address will be deleted in a couple of days, once it starts
receiving spam from this posting.  Please reply to the group!)

More information about the Python-list mailing list