urlib - automatic cookie handling

John J. Lee jjl at pobox.com
Tue Jun 29 16:04:46 EDT 2004


Alex Hunsley <lard at tardis.ed.ac.molar.uk> writes:
[...]
> > http://wwwsearch.sourceforge.net/ClientCookie/
[...]
> Snap! I think we both posted at about the same time. Good to know
> someone was suggesting it anyway!

You might care to know that the cookie-handling part of ClientCookie
has found its way into Python 2.4, as module cookielib.  So, the
development version of CC (which is compatible with old versions of
Python) is currently moving towards being as-compatible-as-possible
with cookielib and 2.4 urllib2.

Actually, if you're using Python 2.3 and want to be
forwards-compatible with 2.4 here, I'm 95% sure you can just grab
cookielib and urllib2 from Python CVS and use those.  cookielib
doesn't import urllib2, so you can leave 2.3's urllib2 intact and use
a local copy of 2.4's urllib2, eg. by keeping it somewhere like
~/lib/python and renaming it urllib2_24.py.  cookielib doesn't include
stuff like HTTPEquivProcessor that are in ClientCookie, but I'll make
those available in a form that works with 2.4 in a separate package
soon (that package will probably be ClientCookie itself, in a 1.0.x or
late 0.9.x version).

I should mention these things on the web page...


John



More information about the Python-list mailing list