def mywarWritten(*args):
    print('mywarWritten', myvar.get())
myvar.trace('w', mywarWritten)
label = Label(root, textvariable=myvar)
label.pack()
text_entry = Entry(root, textvariable=myvar)
text_entry.pack()
root.mainloop()
How to connect a variable to Entry widget?