[twill] managing sessions
james.cameron at hp.com
Wed Dec 7 19:32:56 PST 2005
I'm doing something similar, though between runs rather than within the
same execution path. The trick is to save and restore the cookies.
As a result of asking twill to go to a page, it has a cache of cookies
that the page may have provided. These may be authentication or session
cookies, assuming the site uses them. If the cookies are saved using
twill's command for it, then they can be restored in another run (or
function call) as if no time had passed.
So you could either manipulate the cookies, or you could, as you
suggest, instantiate the browser class (mechanize) that twill uses.
I'm sure Titus could explain better. ;-)
More information about the twill