[mod_python] mod_python claims it cannot find a module

Graham Dumpleton grahamd at dscpl.com.au
Tue Jul 5 07:19:06 EDT 2005

On 05/07/2005, at 4:11 PM, Nicolas Lehuen wrote:
>  What I suspect in Martin's case is that req.finfo returns None 
> because of the global scope of his PythonHandler configuration, or 
> something like that. Therefore, the publisher ends up executing the 
> last branch which splits the requested file name into directory + 
> func_path and adds index.py to the directory. I'll try to reproduce 
> this behaviour and let you know about this.

Except that Martin wasn't using your latest version of the publisher,
but that in the 3.1.[34] as I understand it, so I don't think you can
compare it to what you do now.

What you do now may well work fine, I have never sat down to look at
it properly. Although it worries me a bit that you use req.finfo as 
that making an assumption that the file that Apache identifies is 
the Python code file when it may not. Just speculating, but what happens
if someone was using:

   SetHandler mod_python
   PythonHandler mod_python.publisher | .html

and there existed a "xxx.py" and xxx.html". Here req.finfo would refer 
the ".html" file and not ".py" file. Will this matter? Anyway, the use 
req.finfo seems confusing to me and not sure how one benefits except
maybe to try and avoid a stat call.

One day I will sit down and look at it properly, but no time at the 


More information about the Mod_python mailing list