[mod_python] Re: import requires apache restart?

Graham Dumpleton graham.dumpleton at gmail.com
Fri Oct 19 01:03:03 EDT 2007

Even in mod_python 3.2.8, standard Python modules and packages are not
candidates for automatic reloading when using 'import'. Further, in
mod_python 3.2.8 the mod_python mechanism for reloading module
automatically has a lot of problems and you are really encouraged to
upgrade to mod_python 3.3.1. See:



On 19/10/2007, apocalypznow <apocalypznow at gmail.com> wrote:
> I forgot to add these things:
> mod_python version 3.2.8
> python 2.3.5
> Apache 2
> I'm using modvampire.  I've also found the same behaviour with
> mod_python.publisher.
> apocalypznow wrote:
> > I've noticed something, and I wonder if someone could please confirm if
> > this is the correct behaviour.  In my httpd.conf file, I've included the
> > path to a location where my python files are using the PythonPath
> > directive.  In my handler code file, I issue a standard "import"
> > statement rather than the mod_python (or for that matter,
> > vampire.importModule) versions of the import.  To give light protection
> >  (against authoring infringement) to my source files, after I py_compile
> > them, I delete the original .py files.
> >
> > Even after changing the source of the files in the PythonPath, and after
> > py_compiling them, and after removing the original .py files, I found
> > that an Apache restart is required for the changes to be effected.  Does
> > this make sense?  If that is the case, is there some copy of the python
> > file being made by mod_python somewhere?
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list