Should I use Entry's .get() or its textvariable's for Tkinter in Python?
python, tkinter
Solution
Unless you are doing traces on the StringVars, I say stick with using the `get` method and don't create StringVars. Using the `get` method removes complexity -- one less object to maintain and one less object to take up space in memory (multiplied by however many times you use StringVars in your application).
Sure, it's an imperceptible amount of overhead, but all things being equal, the less complex solution is usually the best. Why add a variable that allows you to do what you can already do without the variable?
Problem
The code is something like: ``` myVar = StringVar() myEntry = Entry(master, textvariable=myVar) ``` So when I need to retrieve input from `myEntry`, should I use ``` myText = myVar.get() ``` or ``` myText = myEntry.get() ``` Is there a better way ? (and why?)