Closed GoogleCodeExporter closed 8 years ago
The directory isn't part of PYTHONPATH (sys.path) on mod_python any more as
that causes lots of problems. See:
http://www.dscpl.com.au/wiki/ModPython/Articles/ModuleImportingIsBroken
To fix the problems mod_python has a custom import hook that intercepts import
and does special magic. In
doing that though there are various restrictions. For example, you can't put
packages in the document directory
and be able to import them. If you fiddle things and explicitly add the
directory using PythonPath, then you can
cause other problems with double imports.
It is because of all the problems that can come up with trying to maintain
separate sys.path per
location/directory context that mod_wsgi doesn't attempt to do the same. So,
will not be changing
WSGIPythonPath behaviour. Also be aware that that directive only applies to
embedded mode anyway and not
daemon mode.
If you want a solution, go ask your question about what you want to achieve on
the mod_wsgi mailing list on
Google Groups and I will give you a description there of how you can achieve
what you want. I don't want to do it
here as it will be of general interest as I haven't necessarily explained it
previously on the list nor is it
documented.
Original comment by Graham.Dumpleton@gmail.com
on 2 Sep 2009 at 5:25
Original issue reported on code.google.com by
craigle...@gmail.com
on 2 Sep 2009 at 4:45