Advertisement
Felanpro

Window and buttons

May 21st, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. from tkinter import *
  2. window = Tk()
  3.  
  4. def button1_func():
  5.     print("Hello World!")
  6.  
  7. def button2_func():
  8.     print("Goodbye World!")
  9.  
  10. button1 = Button(window, text="Click", command=button1_func)
  11. button2 = Button(window, text="Click2", command=button2_func)
  12.  
  13. #Add the button to the window.
  14. button1.pack()
  15. button2.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement