I have two buttons Start and Stop and when I click on the start button, I want to go through a while, but when I want to stop it, the Tkinter window is blocked and I can't click on the Stop button because the whole window is blocked.
Below is my code:
s = 1
def Start():
while(s==1):
#do something
def Stop():
global s
s = 0
btn_Start= Button(root, text = 'Start',width=9, height=2, command = Start).place(x=2,y=2)
btn_Stop = Button(root, text = 'Stop',width=9, height=2, command = Stop).place(x=2,y=42)
Does anyone know how can I stop the while?
Edited:-------- still the same error