SAiello at Jentoo.com
SAiello at Jentoo.com
Fri Feb 6 11:24:54 EST 2004
Per the 3.0 documentation I have setup up apache 2.0.48 per chapter 6.1.1. Documentation as follows: To use the handler, you need the following lines in your configuration <Directory /some/path} SetHandler python-program PythonHandler mod_python.publisher </Directory> This handler allows access to functions and variables within a module via URL's. For example, if you have the following module, called hello.py: """ Publisher example """ def say(req, what="NOTHING"): return "I am saying %s" % what A URL http://www.mysite.com/hello.py/say would return "I am saying NOTHING". A URL http://www.mysite.com/hello.py/say?what=hello would return "I am saying hello". When I access my server I get the following error: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 338, in HandlerDispatch result = object(req) File "/usr/lib/python2.2/site-packages/mod_python/publisher.py", line 140, in handler path=[path]) File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 493, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named index
|