Graham Dumpleton writes: > > When I go to http://localhost/~dpopowich/py/syspath, a simple > > mpservlet that writes out the current value of sys.path, I do NOT see > > /home/dpopowich/public_html/py in the path. > > You will not see the path listed in sys.path. The mod_python module > importer path and the Python sys.path are deliberately kept separate > because of all the problems caused by each looking in the same > location.
But I did see the path in sys.path before 3.3. Prior to 3.3, the directory that contained the SetHandler directive would be in sys.path. I have no idea if this behaviour in versions <3.3 is because of the old apache.import_module or some other "feature," but it's not there in 3.3. > > And when I try to import > > a python module in that directory, I get import errors. > > If you are still using the old module importer in mpservlets to import > your .mps file then that would probably still occur. No. I do NOT use apache.import_module() to load .mps files. I rolled my own, using execfile on the filename coming from req.filename.