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

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -