[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
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
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
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