[mod_python] psp problem

Wouter van Marle wouter at squirrel-systems.com
Wed May 11 13:28:32 EDT 2005

Hi all,

I've a problem using the psp functions.
What I am doing:
I've a psp page, using some in-line python code, in between <% and %>
tags as per many examples. I however get all the time syntax errors when
running this through the psp.PSP.run() function. I'm sure my python code
as such is correct, so I'm at a loss here. Some code:

<!-- rest of the header and so -->
<p> some text for the page </p>
for r in Results:
I got the result <%=r%><br>
# end indentation

then in my python program I have made a list Results, containing

page = psp.PSP(req, "page.psp")
page.run({"Results": Results})

When running it like that, in my browser an error message appears giving
a syntax error, pointing at the "for" in the loop.

Now from the documentation I can not find anything that would forbid
this. I haven't tried to set up a psp handler in apache, as I do not
intend to use this as such. I want to be able to pass a list of results
to the page, and then have the page fill itself, as smart template. The
main code should be out of the page.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050512/97e4cc59/attachment.html

More information about the Mod_python mailing list