<div><span class="gmail_quote">On 2/15/08, <b class="gmail_sendername">Rich Shepard</b> <<a href="mailto:rshepard@appl-ecosys.com">rshepard@appl-ecosys.com</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;">
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> 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> ...<br><br>Beyond that, it's not exactly clear what the structure of your tuples is, but let's say you have the following:<br><br>mytup = (<br> ('a', (1,2,3), 'b'),<br>
('c', (5,6,7,8), 'c')<br> )<br><br>The second element of each tuple is another tuple. One way you might manipulate this is:<br><br>for row in mytup:<br> print row[0]<br> for inner in row[1]:<br>
print ' - ', inner<br><br>That's pretty trivial, but it shows iterating over sub-collections of unequal length. Hopefully part of that answers your question.<br><br>If that's not helpful, you might want to post a dump of a couple rows of the tuple you're struggling with.<br>
<br>HTH,<br><br>Dylan<br></div></div><br>