Question about using cookielib in python 2.4

Marko.Cain.23 at gmail.com Marko.Cain.23 at gmail.com
Thu Mar 29 16:42:41 EDT 2007


Hi,
I am following the example of Python cookbook (14.7) about using
cookielib in python2.4

 cj = cookielib.LWPCookieJar()
//.... code to send out the request
    print "Coookie-------------------------"
            if cj is not None:
                for index, cookie in enumerate(cj):
                    print index, ': ' , cookie
                cj.save(COOKIEFILE)

My question is I see cookie being printed in the above code,
but when I do a 'more ' of the Cookie file, it is empty?

This is what I see on the screen:

Coookie-------------------------
0 :  <Cookie Test-ID=swmfp2caw065kswg for .vision5.abc.com/>

but when I more the 'cookie file', it is empty?

$ more cookies.lwp
#LWP-Cookies-2.0
$




More information about the Python-list mailing list