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> &lt;<a href="mailto:titus@caltech.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">titus@caltech.edu
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-&gt; I'm doing something similar, though between runs rather than within the<br>-&gt; same execution path.&nbsp;&nbsp;The trick is to save and restore the cookies.<br>-&gt;<br>-&gt; As a result of asking twill to go to a page, it has a cache of cookies
<br>-&gt; that the page may have provided.&nbsp;&nbsp;These may be authentication or session<br>-&gt; cookies, assuming the site uses them.&nbsp;&nbsp;If the cookies are saved using<br>-&gt; twill's command for it, then they can be restored in another run (or
<br>-&gt; function call) as if no time had passed.<br>-&gt;<br>-&gt; So you could either manipulate the cookies, or you could, as you<br>-&gt; suggest, instantiate the browser class (mechanize) that twill uses.<br>-&gt;<br>

-&gt; I'm sure Titus could explain better.&nbsp;&nbsp;;-)<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.&nbsp;&nbsp;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>