[mod_python] Trying to get new importer working

Jim Geist jimge at rodentia.net
Wed Apr 9 01:02:19 EDT 2008

Hi all -

I am trying to convert my project over from using sys.path to use the  
new importer and I'm having some issues. In my apache config I have this

<Location /test>
     SetHandler mod_python
     PythonOption mod_python.importer.path "['/home/jimge/app']"
     PythonHandler entry
     PythonDebug On

/home/jimge/app/entry.py contains (well, more code, but it boils down  

from mod_python import apache
def handler(req):	
     req.write("hello, world!\n")
     return apache.OK

When I was using PythonPath to set up sys.path everything worked. With  
this setup I get an ImportError exception that entry cannot be found.

Anyone have any hints?


-- Jim

More information about the Mod_python mailing list