Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. from Tkinter import Button
  2. def act(): # defines an event function - for click of button
  3. print "I-M-pressed"
  4. foo = Button(None,text="Press Me",command=act) # create & configure widget 'button"
  5. foo.pack() # defines placement & geometry of the widget (will use it later)
  6. foo.mainloop() # an event loop to invoke custom function "act"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement