button = []
for i in range(0,10):
print i
buttonlabel = "field " +str(i)
button[i].append = Button (text=buttonlabel)
button[i].grid(column=3, row = i+3)
You are misusing the button list. You can't use an index until you have added the item to the list. The above two lines should be written something like this:
aButton = Button (text=buttonlabel)
aButton.grid(column=3, row = i+3)
button.append(aButton)By the way you are reusing the name button (you use the name for the 'hello' button) and if you are not going to use the button list you don't need to create it (just omit 'button.append(aButton)')
Kent
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
