Python version (and python module verions, e.g. libapache2-mod-python)
typing "python" at the prompt will enter the python environment prompt
import mod_python.psp
Example:
root:/# python
Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import mod_python.psp Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python2.5/site-packages/mod_python/psp.py", line 21, in import apache, Session, util, _psp File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 30, in import _apache
ImportError: No module named _apache
"ImportError: No module named _apache" means you have mod_python version 3.1 or later "ImportError: No module named psp" means you only have version 2.7 or 3.0 "ImportError: No module named mod_python_psp" means mod_python isn't installed at all (not for your Python version, at least)
import mod_python.testhandler Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python2.5/site-packages/mod_python/testhandler.py", line 26, in from mod_python import apache, util File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 30, in import _apache ImportError: No module named _apache
"ImportError: No module named testhandles" means version 3.1
quit() //to exit