Hmmm, somehow I managed to vapourise an email, didn't even get to my sent mail box. Let me try this again.
Jim Gallacher wrote .. > Graham Dumpleton wrote: > > Correct, is actually done from the mod_python module init function. > > > > The only way one could have it dynamically changing is through an > > Apache -D option checked by using ap_exists_config_define(). > > This is incorrect. You can get at the directives from python_init. Proof > of concept patch attached. Apply the patch and add the following > directives in your apache config after the LoadModule. > > LoadModule python_module /usr/lib/apache2/modules/mod_python.so > PythonModuleConfig max_locks 911 > PythonModuleConfig mutex_dir /some/place/safe > > Check the error.log for the results. > > I'm sure I don't need to tell everyone that this is intend as Proof of > Concept only. Don't blame me if your hair catches on fire and your teeth > fall out as a result of using this patch. :) I don't have much hair left, so I better believe you. Thus I stand corrected. I also should look more closely at the code before I send off email. :-) If the settings are going to be a generic key/value like in PythonOption, but only for purposes of the mod_python system itself, maybe it should be called PythonSystemOption. Prefer PythonSystemOption as "Module" is too confusing to me given you have both Apache modules and Python modules and a module importer. Also wary of "Config" because of confusion with "req.get_config()". Other than that, probably is reasonable. What other configuration things are there like this that could be handled in the same way? Would it be possible using such a thing to specify a directory that could be prefixed to sys.path to say where mod_python Apache module should look for mod_python Python modules? It is always a pain to debug sometimes when people have multiple versions of Python and for various reasons their Apache environment means it is finding wrong mod_python modules. If had way of saying where it was, could override it as way of proving one way or another it is a problem. Yes/No? Graham