Title: cookielib lacks FileCookieJar class for Internet Explorer
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, dstanek, janssen, jjlee, methane, orsenthil, terry.reedy
Priority: normal Keywords:

Created on 2008-02-04 19:35 by janssen, last changed 2019-04-13 10:05 by methane. This issue is now closed.

Messages (9)
msg62046 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2008-02-04 19:35
cookielib contains an implementation of FileCookieJar for Mozilla
Firefox, which will work with most of the various Mozilla browsers, but
no implementation for Internet Explorer, standard on Windows and used by
some 80% of computer users.
msg62093 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-06 12:16
From the doc string:
note that BSDDBCookieJar and the MSIE* classes are not
distributed with the Python standard library, but are available from
msg62113 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2008-02-06 18:34
Yes, I saw that, but it doesn't really help.  Batteries not included.

It suggests an approach to addressing this problem, though:  see if the
author will contribute the code under an appropriate licence.

I intend to write an instance of FileCookieJar for Safari.


On Feb 6, 2008 4:16 AM, Christian Heimes <> wrote:

> Christian Heimes added the comment:
> From the doc string:
> note that BSDDBCookieJar and the MSIE* classes are not
> distributed with the Python standard library, but are available from
> ----------
> nosy: +tiran
> priority:  -> normal
> __________________________________
> Tracker <>
> <>
> __________________________________
msg74812 - (view) Author: John J Lee (jjlee) Date: 2008-10-15 20:12
Note that the code on only reads cookies, and does not
write them.  Also, the approach used is fragile to changes to MS's
"index.dat" database, which was the reason why that code was not
included when cookielib was added.  As far as I know, the index.dat
format is not specified and is subject to change or removal by MS.  It's
possible that that MSIE cookiejar is already broken on Windows Vista,
for example, since I have never tested it on that platform.

An alternative approach that should allow writing cookies would be to
use InternetGetCookie / InternetSetCookie API:

A *sketch* of that approach (which I'm not going to implement properly)
is here:

The other, fragile (but working, at least on some MS OSes) approach:
msg74847 - (view) Author: John J Lee (jjlee) Date: 2008-10-16 19:32
Forgot to add: if somebody else does the work, I'm happy to agree to the
code being used in Python stdlib.  Perhaps it would be necessary to get
the author of the original Perl code from which this MSIE class is
derived to sign a contributor agreement, though (even though he already
agreed to a BSD-ish license).

FWIW, there's also a Firefox 3 cookies.sqlite cookiejar in the same
package (though not yet used in anger by me, and wanting more tests, so
marked experimental).
msg109820 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-07-10 06:07
Removed file was a dup of msg62113 Jansen  2008-02-06 13:34

FileCookieJars are now in http.cookiejar. Doc says "The following CookieJar subclasses are provided for reading and writing . Further CookieJar subclasses, including one that reads Microsoft Internet Explorer cookies, are available at"

Link does not work and appears to be superseded by

If this issue is closed, at least that doc change should be made.
msg109850 - (view) Author: John J Lee (jjlee) Date: 2010-07-10 11:06
Suggest removing the comment that Terry refers to.  That referenced MSIE code doesn't have an automated test, I've no idea whether it still works on modern Windows OSes, mechanize no longer supports use with urllib2, and I don't think that link is really appropriate in the docs anyway -- Google will likely give people more accurate information.
msg109960 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-07-11 05:03
I removed the documentation comment in r82785. But the report still holds till we have a class for handling MSIE Cookies.
msg340150 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-04-13 10:05
I don't think adding MSIE support is not worth enough for now.
Date User Action Args
2019-04-13 10:05:38methanesetstatus: open -> closed

nosy: + methane
messages: + msg340150

resolution: out of date
stage: needs patch -> resolved
2011-01-26 17:54:27dstaneksetnosy: + dstanek
2010-07-11 05:03:17orsenthilsetnosy: + orsenthil

messages: + msg109960
stage: needs patch
2010-07-10 11:06:13jjleesetmessages: + msg109850
2010-07-10 06:07:25terry.reedysetnosy: + terry.reedy

messages: + msg109820
versions: + Python 3.2, - Python 2.6, Python 3.0
2010-07-10 05:57:55terry.reedysetfiles: - unnamed
2008-10-16 19:32:10jjleesetmessages: + msg74847
2008-10-15 20:12:52jjleesetnosy: + jjlee
messages: + msg74812
2008-02-06 18:34:04janssensetfiles: + unnamed
messages: + msg62113
2008-02-06 12:16:17christian.heimessetpriority: normal
nosy: + christian.heimes
messages: + msg62093
2008-02-04 19:56:09georg.brandlsettype: behavior -> enhancement
2008-02-04 19:35:52janssencreate