Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize.