<br>Ps:<br>When I go to shell and type:rowN = int(0)<br><br>rows = [["1223", "11/23/08", "Purchase", "To be shipped", "Gallery Name", "Art Title[22 of 300]", "$10,000"],#1st row<br>
["1223", "11/23/08", "Purchase", "To be shipped", "Gallery Name", "Art Title[22 of 300]", "$10,000"],#2nd row<br> ["1223", "11/23/08", "Purchase", "To be shipped", "Gallery Name", "Art Title[22 of 300]", "$10,000"],#etc, obviouslly these info will be fetched from the db<br>
["1223", "11/23/08", "Purchase", "To be shipped", "Gallery Name", "Art Title[22 of 300]", "$10,000"]<br> ]<br>for row in rows:<br>
<br> colN = int(0)<br> for col in row:<br> print str(colN) + "," + str(rowN) + " - " + col<br> <br><br>It works and print everything correctly Oo<br><div class="gmail_quote">On Thu, May 8, 2008 at 10:44 PM, David Anderson <<a href="mailto:zerty.david@gmail.com">zerty.david@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Look this slice of code:<br><br>rowN = int(0)<br> for row in rows:<br> success = self.resultGrid.AppendRows();<br>
colN = int(0)<br> for col in row:<br> self.resultGrid.SetReadOnly(self.resultGrid.GetNumberRows() - 1,colN,isReadOnly = True)<br>
print rowN<br> self.resultGrid.SetCellValue(int(rowN),int(colN),col)<br><br>I am getting this output:<br>0<br>0<br>0<br>0<br>0<br>0<br>0<br>(1,)<br>Traceback (most recent call last):<br> in populateGrid<br>
self.resultGrid.SetCellValue(int(rowN),int(colN),col)<br>TypeError: int() argument must be a string or a number, not 'tuple'<br><br><br>Why is this happening?<br>
</blockquote></div><br>