[mod_python] inithandler?

harm at millionmonkeys.nl harm at millionmonkeys.nl
Tue Sep 18 00:11:40 EST 2001


Moi,

first of all thanks for mod_python. I come from an (mod_)perl world and the
python version definitely is the easier one to use (There are tons of traps
you have to watch out for under mod_perl).

Anyway. My tiny question.

Why is there no init handler? It would run the moment the python
interpreter gets loaded/intiated by the freshly forked apache. It would be a 
nice place to initialise some site global modules.

Sure, I could do a:
if not mypersistentvar:
   mypersistentvar = Some.Nice.Object()

but an InitHandler does look like cleaner to me.

Any better way to arrange initialisation than the above method?

Thanks,
Harmen

-- 
                                                         The Moon is New



More information about the Mod_python mailing list