[EMAIL PROTECTED] (John J. Lee) writes:
[...]
> #-------------------------------
> import mechanize
>
> SHOW_COOKIES = True
>
> br = mechanize.Browser()
> if SHOW_COOKIES:
> cj = mechanize.CookieJar()
> br.set_cookiejar(cj)
> br.open("http://www.magnetshare.com/main.php")
> br.select_form(nr=0)
> br["user"] = "joe"
> br["pass"] = "password"
> r = br.submit()
> assert "Logged In" in r.get_data()
> if SHOW_COOKIES:
> for cookie in cj:
> print cj
> #-------------------------------
That last line should of course have been:
print cookie
and not:
print cj
John
--
http://mail.python.org/mailman/listinfo/python-list