combining mod_python handlers publisher and psp problem

grahamd at dscpl.com.au grahamd at dscpl.com.au
Mon Mar 20 05:35:53 EST 2006


You could also have done:

   def index(req, name='John'):
      s = 'Hello, there!'
      if name:
         names = ['a', 'b', 'c']
         s = 'Hello, %s!' % name.capitalize()
         tmpl = psp.PSP(req, filename='index.psp')
         req.content_type = 'text/html'
         tmpl.run(vars = { 'greet': s, 'names': names })
      return

Try the mod_python mailing list if you want an explaination of why.

Graham




More information about the Python-list mailing list