from DrawingPanel import * def main(): x = 20 y = 50 dx = 4 panel = DrawingPanel(400, 400) while True: panel.clear() panel.fill_oval(x, y, 20, 20, fill="red") panel.sleep(20) x += dx y += 1 if x + 20 >= panel.width or x <= 0: dx = -dx main()