You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make sure the following code runs only twice.
I'm making a drone simulator. And I was making a program in Python tkinter to make a drone move between two points using a canvas. I am asking this question because I would like to take pictures only twice rather than taking pictures of two points indefinitely. I used unbind but it didn't work. I tried using methods other than stop() to terminate the function, but it didn't work. It's very difficult because Python is not my main skill. help.
I want to make sure the following code runs only twice.
I'm making a drone simulator. And I was making a program in Python tkinter to make a drone move between two points using a canvas. I am asking this question because I would like to take pictures only twice rather than taking pictures of two points indefinitely. I used unbind but it didn't work. I tried using methods other than stop() to terminate the function, but it didn't work. It's very difficult because Python is not my main skill. help.
code :
def start_point(event):
x1, y1 = ( event.x-1 ), ( event.y-1 )
x2, y2 = ( event.x+1 ), ( event.y+1 )
canvas.create_oval(x1, y1, x2, y2,width=10, fill='blue', outline='blue')
canvas.bind("", start_point,add='')
The text was updated successfully, but these errors were encountered: