#draws lines with while loop see python 8 import random import time from Tkinter import * frmMain = Tk() myCanvas = Canvas(width=400, height=400, background="orange") oldx = 0 oldy = 0 while oldx <= 350: newx = random.randrange(1,401) newy = random.randrange(1,401) myCanvas.create_line(oldx,oldy,newx,newy,arrow="last") oldx = newx oldy = newy myCanvas.pack() frmMain.mainloop()