[mod_python] psp templates problem

Bjorn Sundberg sundberg.bjorn at gmail.com
Mon Nov 14 19:48:33 EST 2005

Hello i'm quite new to mod_python. I've read the documents on the net and i
found that the templating system is quite interesting. My problem is that
i'm trying to load dynamic data in a template. And when the program runs it
loads and repeat the template file and the variables that i want to change.
So far so good, but i'm only intrested in changing the psp variables in the
file. It seem's that i is not possible to use the <%# Stop %> to prevent the
<p> to repeat. Any body that have any ideas? Thanks in advance.

Björn S
#!/usr/bin/env python
from mod_python import psp

def index(req):
tmpl = psp.PSP(req, filename='3-2.html')
for key in req.subprocess_env.keys():
tmpl.run(vars = {'key': key, 'env': req.subprocess_env[key]})
<table >
<td><%=key %></td>
<td><%=env %></td>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20051115/21799ff8/attachment.html

More information about the Mod_python mailing list