HTMLgen and Cookies

Tim O'Malley timo at bbn.com
Wed Jan 19 18:37:28 EST 2000


hola.

Anders Eriksson writes:
 > My problem is: How do I use HTMLgen and Cookie.py together?

Well, I've never used HTMLgen, but that won't stop me from inserting
this tasty foot into my mouth...

It appears that the CGI class of HTMLgen has an undocumented (at least I 
don't see any document of it) attribute 'http', which is a dictionary.
I would guess you could do something like (very untested):

    q = cgiapp.CGI()
    c = Cookie.SimpleCookie("a=b;")
    q.http["Set-Cookie"] = c.output(header="")

I'm treading water here, but give it a shot..

-- 
.....................................................................
.   happy daze            .   Age and treachery will beat           .
.        -tim O           .       youth and skill every time.       .
.....................................................................




More information about the Python-list mailing list