Place Ghantoos

Apache mod_python local module import

I have searched a lot before finding this tip, so I post it.
It show how to easily import with mod_python a module based on a personal .py file located somewhere on your box.
In this example, I will try to import the module bloup.py located in the same directory of my index.py mainpage.
when trying to import using the usual means, i get:

#!/usr/bin/env python
import os
import bloup
...

>>>ImportError: No module named bloup

The solution I found was:
Read the rest of this entry »