Thanks, Titus and James.<br>
<br>
I'll try it out. It was just one of those things that I thought I'd ask
about before I started creating a program. It's not good to just assume
something will work a certain way and build all your code around that
assumtion, only to find you were wrong.<br>
<br>
-- David Erdman II<br>
<br>
<br><br><div><span class="gmail_quote">On 12/8/05, <b class="gmail_sendername">Titus Brown</b> <<a href="mailto:titus@caltech.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">titus@caltech.edu
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-> I'm doing something similar, though between runs rather than within the<br>-> same execution path. The trick is to save and restore the cookies.<br>-><br>-> As a result of asking twill to go to a page, it has a cache of cookies
<br>-> that the page may have provided. These may be authentication or session<br>-> cookies, assuming the site uses them. If the cookies are saved using<br>-> twill's command for it, then they can be restored in another run (or
<br>-> function call) as if no time had passed.<br>-><br>-> So you could either manipulate the cookies, or you could, as you<br>-> suggest, instantiate the browser class (mechanize) that twill uses.<br>-><br>
-> I'm sure Titus could explain better. ;-)<br><br>Heck, no ;).<br><br>The only thing to add is that mechanize *allows* you to handle cookies;<br>twill *configures* mechanize to use cookies. So you'd have to look at
<br>
twill/browser.py to see how to configure mechanize properly for this<br>purpose if you were going to use it directly.<br><br>cheers,<br>--titus<br><br>_______________________________________________<br>twill mailing list
<br>
<a href="mailto:twill@lists.idyll.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">twill@lists.idyll.org</a><br><a href="http://lists.idyll.org/listinfo/twill" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.idyll.org/listinfo/twill</a><br></blockquote></div><br>