More generally, I am trying to create a table n by 1 ...
Use list and add, however, more Entry widgets are required.
Each record variable must have a different name, so I can call each individual cell
Just index the list (of course, you can configure it to create new instance variables, but you probably don't want this).
You can even put your installation code in a function and call it every time.
def create_entry_widget(self, x): new_widget = Entry(self.master) new_widget.pack() new_widget.insert(0, x) return new_widget
All you have to do is define self.n based on your file.
self.entry_widgets = [self.create_entry_widget(x) for x in xrange(self.n)]
NOTE. Do not use semicolons ; at the end of each line in Python.
Jared source share