Re: combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
[EMAIL PROTECTED] wrote: > 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

Re: combining mod_python handlers publisher and psp problem

2006-03-20 Thread grahamd
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 = { 'g

Re: combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
exhuma.twn wrote: > Simple problem: > > When I define a funtion the way you would with the publisher handler > (without using psp), all works as expected. However when I define a > publisher-like function and instantiate a PSP object in it ( as > suggested on > http://www.onlamp.com/pub/a/python/20

combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
Simple problem: When I define a funtion the way you would with the publisher handler (without using psp), all works as expected. However when I define a publisher-like function and instantiate a PSP object in it ( as suggested on http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.ht