W
W. eWatson
Here's what I think the author meant in discussing a control variable sample
program. <http://effbot.org/tkinterbook/entry.htm>
from Tkinter import *
v=Tk.StringVar()
e = Entry(master, textvariable=v)
e.pack()
e.focus_set()
v.set("a default value")
s = v.get()
mainloop()
The problem is that Python objects to v=.
v=Tk.StringVar()
AttributeError: class Tk has no attribute 'StringVar'
What corrects this?
--
W. eWatson
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet
Web Page: <www.speckledwithstars.net/>
program. <http://effbot.org/tkinterbook/entry.htm>
from Tkinter import *
v=Tk.StringVar()
e = Entry(master, textvariable=v)
e.pack()
e.focus_set()
v.set("a default value")
s = v.get()
mainloop()
The problem is that Python objects to v=.
v=Tk.StringVar()
AttributeError: class Tk has no attribute 'StringVar'
What corrects this?
--
W. eWatson
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet
Web Page: <www.speckledwithstars.net/>