[mod_python] Trying to get new importer working

Graham Dumpleton graham.dumpleton at gmail.com
Wed Apr 9 01:11:10 EDT 2008


2008/4/9 Jim Geist <jimge at rodentia.net>:
> 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
>  </Location>
>
>  /home/jimge/app/entry.py contains (well, more code, but it boils down to)
>
>  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?

Please post the complete Python exception message and any other logged
messages associated with it form the Apache error log and/or web page.
It will save us guessing.

Graham


More information about the Mod_python mailing list