Graham Dumpleton
grahamd at dscpl.com.au
Sun Jun 12 21:26:23 EDT 2005
On 13/06/2005, at 11:14 AM, Bart wrote: > Hey there, > > Apologies if this has been asked and answered before, > but is there any way to make apache/mod_python > temporarily *not* reuse the same interpreter? No. > Google wasn't too helpful on the matter other > than providing the reasons. > > While I'm clear on why this is generally good, while > coding it's quite annoying that I have to restart > apache just to not get it to randomly fail on code > that's in reality any your-guess-is-as-good-as-mine > old version, but practically guaranteed not to be > the current one. What you want is automayic module reloading. Have a look at the automatic module reloading mechanism implicit within the apache.import_module() function. See documentation at: http://www.modpython.org/live/current/doc-html/pyapi-apmeth.html This same method is used by mod_python to load a handler. In that case auto reloading is controlled by the PythonAutoReload directive. http://www.modpython.org/live/current/doc-html/dir-other-par.html The current auto reloading mechanism has a number of shortcomings and will not always work, but depending on the complexity of your code it may be sufficient. Graham
|