[mod_python] Render a template (PSP)

Mike Looijmans nlv11281 at natlab.research.philips.com
Mon Oct 2 05:56:58 EDT 2006

You may be able to get away with this:

  grabber = StringIO()
  oldwrite = req.write
  req.write = grabber.write
      req.write = oldwrite

This would redirect any output in the doSomePSPStuff function into the 
grabber object.

Mike Looijmans
Philips Natlab / Topic Automation

durumdara wrote:
> I want to only render a PSP template to insert to another PSP-s, I don't 
> want to write to the output stream !
> How to I redirect psp's output to get the rendered text ?

More information about the Mod_python mailing list