ClientCookie bug (followup)

John J. Lee jjl at
Tue Aug 26 22:19:01 CEST 2003

cartermark46 at (Mark Carter) writes:
> At the risk of sounding thick ... this doesn't work either! I couldn't
> get load_cookie_data() to work using the above template, either. What
> seems odd for starters is the line
> response = ClientCookie.urlopen(url)
> What makes it odd is that to an offhand observer, there is nothing
> visibly connecting the urlopen() command to c. Sure, some fancy stuff


def go10():
    #works with win xp
    import ClientCookie
    c = ClientCookie.MSIECookieJar(delayload=1)
    c.load_from_registry(username='mcarter') #only need username for win9x
    opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(c))

    url = ''
    response =

    print  # headers
    print  # body

All of this is explained in the web page, though.  [attempts to looks
at web page] Well, it would be if the link weren't broken or I could
log in to my SF account to fix it... Sigh.

BTW, if you want to use ClientCookie.urlopen rather than,
you can call ClientCookie.install_opener(opener) to install a global
opener, just as you would with urllib2.


More information about the Python-list mailing list