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