[mod_python] publisher frustration

emf i at mindlace.net
Tue May 27 13:30:44 EST 2003

I'm trying to make a simple function work using the publisher; I get a 
404 if I try to access a function in the method I want to use.

Here is what I think should be the appropriate entry in my <VirtualHost> 

     <Directory /slideshow/>
         AddHandler python-program .py
	#I added to the python path in frustration...
         PythonPath "sys.path+['/home/mindlace/site/slideshow']"
         PythonHandler mod_python.publisher
         PythonDebug on

This is (the relevant portion of) slide_view.py:

body = ("<html><head><title>resolution</title>"
         "<body><p>The resolution is %s</p></body>"

def showResolution(req):
     if 'Cookie' in req.headers_in:
         Cookies = SmartCookie().load(req.headers_in['Cookie'])
         if 'resolution' in Cookies:
             resolution = Cookies['resolution'].split('x')
         resolution = "Not Found"
     return body % resolution

So why does this do nothing?


Thanks for any pointers,


More information about the Mod_python mailing list