[Tutor] Retrieving Data from Pmw.EntryFeild

Kent Johnson kent37 at tds.net
Tue May 12 13:30:10 CEST 2009


On Tue, May 12, 2009 at 3:28 AM, Sampath Girish
<girishmsampath at gmail.com> wrote:
> Hi friend....
>                 This is Sam, a python learner. I have got some problem in
> retrieving data from a grid of Pmw.EntryFields. Now i have developed a grid
> of size 3X3 using two for loops. One for row and other for column. Now i
> Have 9 entry fields in the form of a matrix. I need to get all the entered
> data in the form of list one by one as soon as i press 'Submit' button.
> Please help me in this.

You can use two for loops again. I can't be specific without seeing
your code but something like this:

result = []
for i in range(3):
  for j in range(3):
    value = <value in location (i, j) of the grid>
    result.append(value)

Kent


More information about the Tutor mailing list