Errors out when trying to import one of the mod_python classes
[root@optimus-prime cgi-bin]# python
Python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mod_python
>>> from mod_python import Session
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/mod_python/Session.py", line 20, in ?
import apache, Cookie
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 28, in ?
ImportError: No module named _apache
Oh, version stuff:
[root@optimus-prime ~]# rpm -qv mod_python
What is this, Raw Hide, FC4, ...?
This is all done solely from the command line and it was just suggested to me
that perhaps the module isn't intended to work outside of a python cgi script.
In the cgi the module works fine.
mod_python is an apache module and is not intended for use outside of apache.