[Tutor] All Entry Boxes taking the same value

Peter Otten __peter__ at web.de
Fri Mar 31 06:20:52 EDT 2017

Pooja Bhalode wrote:

> average = [" ", " ", " "]

> for i in range(len(reactants)):
>     Entry(root, textvariable = average[i], width = 15,
>     state=DISABLED).grid(row = 3+i, column = 1, sticky = W)

Hint: What is passed as textvariable? What should be?

Unfortunately the Entry accepts both StringVar instances and names of 
StringVar instances which automagically spring into existence -- and " " is 
a valid name...

Pooja, I have been watching your efforts to write one or more python/tkinter 
scripts mostly via try and error for a while now. It is obvious that it 
doesn't work as there are so many more ways to go wrong than right.

I recommend that you see if you can find a tutorial for both Python and 
Tkinter, and work through that for a few weeks, say. Once you have a general 
understanding of programming your progress will be faster, and you won't 
destroy the result of the previous step with the changes you make in the 

More information about the Tutor mailing list