[mod_python] inithandler?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue Sep 18 08:54:04 EST 2001


On Tue, 18 Sep 2001, harm wrote:

> On Mon, Sep 17, 2001 at 10:59:18PM -0400, Gregory (Grisha) Trubetskoy wrote:
> >
> > There is a PythonImport, which essentially does this. It has some severe
> > limitations.
> >
> > The thing is that mod_python will create separate subinterpreters for
> > separate virtual servers (or optionally directories), but the only
> > opportunity to learn this information is during request procesing.
> >
> > At Apache startup time you can't tell what the subinterpreters will be.
>
> But you do know it the moment the subinterpreters are actually created,
> don`t you? So mod_python could call some handlers the moment it creates
> an fresh interpreter.

Subinterpreters are created during request processing - if one exists
already it is used, otherwise it is created. So it won't be any different
than using the Python import mechanism for one time initialization.

Grisha




More information about the Mod_python mailing list