<div><span class="gmail_quote">On 2/15/08, <b class="gmail_sendername">Rich Shepard</b> &lt;<a href="mailto:rshepard@appl-ecosys.com">rshepard@appl-ecosys.com</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;">
&nbsp;&nbsp; Data start with a list of tuples. I iterate through the list and extract<br> each tuple using,<br> <br> for i in range(len(self.appData.tsets)):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.row = self.appData.tsets[i]</blockquote><div><br>Unless you *really* want to set self.row, I might do this instead:<br>
<br>for row in self.appData.tsets:<br>&nbsp;&nbsp;&nbsp; ...<br><br>Beyond that, it&#39;s not exactly clear what the structure of your tuples is, but let&#39;s say you have the following:<br><br>mytup = (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&#39;a&#39;, (1,2,3), &#39;b&#39;),<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&#39;c&#39;, (5,6,7,8), &#39;c&#39;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br><br>The second element of each tuple is another tuple.&nbsp; One way you might manipulate this is:<br><br>for row in mytup:<br>&nbsp;&nbsp;&nbsp; print row[0]<br>&nbsp;&nbsp;&nbsp; for inner in row[1]:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &#39; - &#39;, inner<br><br>That&#39;s pretty trivial, but it shows iterating over sub-collections of unequal length.&nbsp; Hopefully part of that answers your question.<br><br>If that&#39;s not helpful, you might want to post a dump of a couple rows of the tuple you&#39;re struggling with.<br>
<br>HTH,<br><br>Dylan<br></div></div><br>