Prev: staticmethod and namespaces
Next: +Hi+
From: Gilles Ganault on 7 Apr 2010 12:56 Hello I'm using ActivePython 2.5.1 and the cookielib package to retrieve web pages. I'd like to display a given cookie from the cookiejar instead of the whole thing: ======== #OK for index, cookie in enumerate(cj): print index, ' : ', cookie #How to display just PHPSESSID? #AttributeError: CookieJar instance has no attribute '__getitem__' print "PHPSESSID: %s" % cj['PHPSESSID'] ======== I'm sure it's very simple but googling for this didn't return samples. Thank you.
|
Pages: 1 Prev: staticmethod and namespaces Next: +Hi+ |