[mod_python] Must restart apache for recompile?

Jim Gallacher jpg at jgassociates.ca
Wed May 31 07:29:28 EDT 2006

Mike Looijmans wrote:
> It may not be the prettiest, but a restart is surely the most stable way 
> to do this. It's only a sighup on most systems anyway.
> In a previous project, I had a "secret" reload page, that tried to flush 
> out all my modules from the sys.modules list, by calling reload() for 
> each one, something like:
> for modul in sys.modules:
>   if "/myapp/" in modul.__file__:
>     reload(modul)
> I don't recall the exact semantics (the code above probably won't really 
> work).
> As an alternative, grab the latest mod_python and give Graham's new 
> module loader a workout. That ought to fix it properly.

Just a small clarification. The new importer is in the subversion trunk 
repository, but not in the released 3.2.x stable branch.


More information about the Mod_python mailing list