python - Textvariable not working with Entry (Tkinter) -


i'm having trouble entry widget tkinter in python 3.4.1

when running code, entry appears blank while expect display "var" :

# -*- coding: utf8 -*-  tkinter import *  w = tk() v = stringvar()  v.set("var") e = entry(w, textvariable = v) e.pack()  w.mainloop() 


Comments

Popular posts from this blog

c# - Class in a list -

mysql - Django database model for my website -

ios - How to run a segue on itself OR another viewController -