Python Forum
how to bind entry to a function in another file - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: how to bind entry to a function in another file (/thread-4272.html)



how to bind entry to a function in another file - Rishav - Aug-04-2017

so i have an entry box when i enter something into it and press enter it will print the value. when the function which i am binding into is in same python file then it is working but how i can bind entry_box to function in another file . i tried it but it doesn't seem to work. here is my code
from tkinter import *
import two

root = Tk()
entry_var = StringVar()
entry_box = Entry(root)
entry_box.bind("<Return>",lambda entry_var:two.function)
entry_box.pack()
root.mainloop()



RE: how to bind entry to a function in another file - metulburr - Aug-07-2017

what does the module two contain?