[mod_python] syntax errors

David Bear David.Bear at asu.edu
Tue May 9 22:18:24 EDT 2006


I'm using psp handler like this:

<Directory "/www/htdocs/psp">
 AddHandler mod_python .psp
 PythonHandler mod_python.psp
 PythonDebug On
</Directory>

my html.psp file contains a simple exercise from onlamp demonstrating
psp and looks like this:


<html>
 <head>
   <title>A psp test </title>
 </head>
 <body>
<% 
if form.has_key('name'):
   greet = 'Hellow %s ' % form.['name'].capitalize()
else: 
   greet = 'hellow nobody '
%>
   <h1>A greeting test </h1>
   <%= greet %>
 </body>
<html>

I am getting a syntax error. My reading of the onlamp article
indicated that indentation shouldn't be a problem -- and indentation
is consistent. I'm just not seeing the error.

There must be something really simple that I'm missing. Any
suggestions?
-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"


More information about the Mod_python mailing list