I'm trying to add items dynamically detected into a PyGTK listview.
I'm using Python 3 and PyGObject.
Here are some example lists:
['MomAndKids', 'ddwrt', 'Squirt', 'blurb']
['WPA1', 'Open', 'WPA2', 'WEP']
['44/70', '38/70', '66/70', '55/70']
I want it to make a row for each one, that would turn out like this:
['MomAndKids', 'WPA1', '44/70']
['ddwrt', 'Open', '38/70']
['Squirt', 'WPA2', '66/70']
['blurb', 'WEP', '55/70']
And then add each of these rows into a GTK List view. I am using this code, and it almost works:
for i in range(len(output)):
string1 = output[i]
for i in range(len(output2)):
string2 = output2[i]
for i in range(len(output3)):
string3 = output3[i]
row = [string1, string2, string3]
self.APStore.append([string1, string2, string3])
It makes something like this: http://pastebin.com/sXNnKfaf (sorry for external link, it makes the posting here not nearly as long.)
I understand why, so I tried this:
for i in range(len(output)):
string1 = output[i]
for i in range(len(output2)):
string2 = output2[i]
for i in range(len(output3)):
string3 = output3[i]
row = [string1, string2, string3]
self.APStore.append([string1, string2, string3])
but it makes this:
['blurb', 'WEP', '55/70']
if it matters, I am detecting this using grep.