<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi,
<div><br>
</div>
<div>It's trivial to get at the mechanize ClientForm instances. You might try:</div>
<div><br>
</div>
<div>forms = list(twill.showforms())</div>
<div><br>
</div>
<div>That would return (e.g., on a site of ours with 2 forms):</div>
<div><br>
</div>
<div>
<div>[&lt;_mechanize_dist.ClientForm.HTMLForm instance at 0x1010c0cb0&gt;, &lt;_mechanize_dist.ClientForm.HTMLForm instance at 0x1010c0f38&gt;]</div>
<div><br>
</div>
<div>Hope that helps,</div>
<div>Kevin</div>
<div><br>
</div>
<div>
<div>On May 21, 2010, at 10:54 AM, Norman Khine wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>hello,<br>
is there a direct way to check how many forms the page returned has?<br>
from the docs:<br>
showforms -- show all of the forms on the current page. When called<br>
from Python, this function returns a list of the forms.<br>
<br>
but if i do<br>
b = twill.get_browser()<br>
forms = b.showforms()<br>
print len(forms)<br>
<br>
i get<br>
TypeError: object of type 'NoneType' has no len()<br>
<br>
thanks<br>
-- <br>
%&gt;&gt;&gt; &quot;&quot;.join( [ {'*':'@','^':'.'}.get(c,None) or<br>
chr(97&#43;(ord(c)-83)%26) for c in &quot;,adym,*)&amp;uzq^zqf&quot; ] )<br>
<br>
_______________________________________________<br>
twill mailing list<br>
<a href="mailto:twill@lists.idyll.org">twill@lists.idyll.org</a><br>
http://lists.idyll.org/listinfo/twill<br>
</div>
</blockquote>
</div>
<br>
<div>
<div><font face="Calibri, Verdana, Helvetica, Arial"><font size="2"><span style="font-size: 10pt; "><b>Kevin P. Boers &nbsp;<br>
</b>QA Manager<br>
847-440-8381<br>
</span></font></font><font face="Times New Roman"><span style="font-size: 12pt; "><br>
</span></font><font size="2"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 10pt; "><b>Leapfrog Online<br>
</b>807 Greenwood<br>
Evanston, IL &nbsp;60201<br>
Main 847-492-1968<br>
Fax &nbsp;847-492-1990<br>
<a href="x-msg://107/kboers@leapfrogonline.com">kboers@leapfrogonline.com</a><br>
<a href="http://www.leapfrogonline.com/">www.leapfrogonline.com</a></span></font></font></div>
</div>
<br>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">CONFIDENTIALITY NOTE<br>
The document(s) accompanying this e-mail transmission, if any, and the e-mail transmittal message containing information from Leapfrog Online Customer Acquisition, LLC is confidential or privileged. The information is intended to be for the use of the individual(s)
 or entity(ies) named on this e-mail transmission message. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this e-mail is prohibited. If you have received this e-mail in error, please immediately
 delete this e-mail and notify us by telephone of the error.<br>
</font>
</body>
</html>