database - Using tkinter for making gui in python -


i trying make gui basic dbms project , while tkinter seems pretty easy part unable how use entry take input , store use later (like if condition or something) eg:

root = tk() label = label(root,text="testing") label.grid(row=0) entry = entry(root) entry.grid(row=0,column=1) 

now want use value/word wrote in entry field print out on example console.

i thought write

print(entry) 

but justs prints random decimal on console, ideally id store value in variable (if not possible use "entry") can use in if conditions etc

i using python 3

you mean want show data in entry?

you may this:

v = stringvar() e = entry(master, textvariable=v) e.pack()  v.set("a default value") s = e.get() 

you can set value of "v", example entry show " default value" string. , can value use "get" method.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -