[mod_python] Re: import requires apache restart?

apocalypznow apocalypznow at gmail.com
Fri Oct 19 00:47:14 EDT 2007


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?



More information about the Mod_python mailing list