Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import math
  2. from Tkinter import *
  3.  
  4. window = Tk()
  5.  
  6. textfield = Entry(window)
  7. canvas = Canvas(window, width=640, height=480)
  8.  
  9. def get(x, y):
  10.  
  11. return True
  12.  
  13. def make():
  14.  
  15. for x in range(0, 107):
  16.  
  17. for y in range(0, 17):
  18.  
  19. if get(x, y):
  20.  
  21. canvas.create_rectangle(x * 5, y * 5, 5, 5, fill="black")
  22. print y
  23.  
  24. print textfield.get()
  25.  
  26. button = Button(window, text="Make", command=make)
  27.  
  28. window.title("Everything Overload")
  29.  
  30. window.minsize(640, 480)
  31. window.maxsize(640, 480)
  32.  
  33. textfield.pack()
  34. button.pack()
  35. canvas.pack()
  36.  
  37. window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement