ANNOUNCE: mod_python 2.0 - A Python module for Apache.
grisha at ispol.com
Sun May 28 16:49:25 CEST 2000
On Sun, 28 May 2000, Cary O'Brien wrote:
> 2) I'm not sure I understand interpreter lifetime. I need to
> create a system that accesses a database (PostgreSQL to start,
> then mabye oracle). So I'd like to have one interpreter per
> apache process, plus an initiliaizer/terminator function. That way there
> could be one persistant database connection per apache process.
The way to do this is to import a module that establishes the database
connection. Since the module will only get imported once the first time
and remain for as long as the process lives, there is your persistent
At this point I do not have cleanups yet, they are coming in the future
versions, so there is no terminator function - you just let the process
> 3) You mentioned using ZPublisher. Does this mean with mod_python you
> could have one interpreter per apache subprocess accessing a common
> Zope database? My concern would be locking on the zope database. I
> asked about doing this on the zope mailing list and couldn't get an
You can use ZPublisher, but not Zope databases.
Unfortunately, the Zope database locking is not suitable for simultaneous
access by multiple processes. May be existance of mod_python will not give
the Zope developers enough incentive to implement that.
> 4) Isn't there another mod_python floating around out there? Or is
> this the same one as http://modules.apache.org/search?id=49 ?
pyapache != mod_python
> 5) I've got the bits to pull out embedded code from HTML documents and
> execute them (from a tcl based module). Interested?
Yes and no. The idea sounds good, but this sort of thing doesn't belong in
mod_python. Some time soon I will create a section on the website for
"third party" mod_python handlers - this could be one of them.
More information about the Python-list