I have a program that I want to keep looping uptil the user clicks in the window. It is a ball bouncing around in a window using the graphics module. I tried using win.getmouse() and then win.close(), but then it has to wait between every loop and will only go once.
for i in range(0,700):
xdir,ydir = slope(x,y,xdir,ydir)
color,n = shader(x,y,color,n)
x = x + xdir
y = y + ydir
circ = Circle(Point(x,y), 4)
I've searched the python documentation, but don't see anything that will do this. I was thinking of something like onclick, but I can't find anything like that.