Cookie module

Lenny Self lenny at squiggie.com
Thu Mar 16 19:15:15 EST 2000


I believe your problem is that you do not the the 'get' in your call.  The
call should look like this:

ck = Cookie.SmartCookie(os.environ["HTTP_COOKIE"])
L = ck("ogin").value

Good luck.

    -- Lenny Self
        lenny at squiggie.com

"Akhar" <akhar at videotron.ca> wrote in message
news:JjeA4.200$x24.24089 at weber.videotron.net...
> I tried your cookie module it works fine under the python interpreter but
> when I use it on my web site it gives me an error I am trying to use:
> ck = Cookie.SmartCookie(os.environ.get("HTTP_COOKIE",""))
> L = ck.get("ogin").value
> but it tells me
> httpd: [Tue Mar 14 17:46:03 2000] [error] [client 192.168.0.2] Premature
end
> of
> script headers: /var/www/cgi-bin/mail/msg.py
>   File "/var/www/cgi-bin/mail/msg.py", line 20
>     L = ck.get("ogin").value
>     ^
> SyntaxError: invalid syntax
> httpd: [Tue Mar 14 17:50:43 2000] [error] [client 192.168.0.2] Premature
end
> of
> script headers: /var/www/cgi-bin/mail/msg.py
> So how can I get the info stored in a cookie from one form to another??
>
> Regards,
> Akhar
>
> Note: do you of any good crypto module to encrypt and decrypt passwords?
>
>
>





More information about the Python-list mailing list