[mod_python] [SPAM] Sample .psp code returns a blank page

Rob Shinn rob.shinn at gmail.com
Wed May 21 22:23:09 EDT 2008


tried running the sample "Hello, world" PSP script from the 
documentation but it just returns a blank page. I'm running mod_python 
3.2.10 on Apache 2.2.3 running under Ubuntu 7.04 Feisty. Apache 
directives used to load mod_python.psp:

<Directory /var/www-sec/st/>
      AddHandler mod_python .psp .psp_
      PythonHandler mod_python.psp
      PythonDebug On
</Directory>

I also tried using PSP through PublisherHandler. Same thing, the run() 
method of the psp.PSP instance returns nothing:

#!/usr/bin/env python
from mod_python import apache,psp


def handler(req):
    req.content_type = 'text/html'
    template = psp.PSP(req, filename='/var/www/st/test.psp')
    #req.write("%s" % template.run())
    template.run({'what':'hello'})
    req.flush()
    return apache.OK



More information about the Mod_python mailing list