My tkinter application has a function which has a time.sleep() function in it so anytime I run the function that has the time.sleep() function, the whole application freezes until seconds specified in the time.sleep() function has elapsed. This can be a very bad User experience and I need to fix this.
The function that has the time.sleep() function is a call back function from a button so I tried doing something like this:
from tkinter import *
import threading
root = Tk()
schedule_msg_btn = Button(root, text="Schedule Msg", command=lambda : threading.Thread(target=schedule_msg_func).start())
root.mainloop()
It seems to be doing absolutely nothing.