Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_Incrementing_Lines.py
- # just wondering what this would look like
- from Tkinter import *
- ww = 120
- hh = 120
- root = Tk()
- root.title("Incrementing Lines")
- root.geometry("%dx%d+0+0"%(ww,hh))
- canvas = Canvas(root, width=ww, height=hh)
- canvas.grid()
- lines = [ww]*ww
- incr = [0 if not z else 2.0/z for z in range(ww)]
- while 1:
- canvas.delete('all')
- for y in range(hh):
- lines[y] = (lines[y]+incr[y])%(ww*2)
- x = abs(ww-lines[y])
- canvas.create_line(-2,y,x,y)
- root.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement