""" Simple animation example with Python and TKinter """ import time from tkinter import * window = Tk() canvas = Canvas(window, width=400, height=300, bg='white') canvas.pack() x = 0 y = 10 ball_diameter = 30 vx = 10.0 vy = 5.0 for t in range(1, 500): x += vx y += vy canvas.create_oval(x, y, x+ball_diameter, y+ball_diameter, fill="blue", tag='blueball') canvas.update() time.sleep(0.05) canvas.delete('blueball') window.mainloop()