I have the following function:
def some_search(event):
print userSearch.get()
And I've set the function to run whenever the user types in the entry field using the below code:
userSearch.bind("<Key>", some_search)
My problem is that userSearch.get()
doesn't return what's actually in the entry field.
For example, if "test"
is in the entry field, the function prints "tes"
.
If "Hello World"
is in the entry field, the function prints "Hello Worl"
.
Sorry if this is a stupid question, I'm fairly new to programming, I suspect the answer will be a simple one.