Advertisement
here2share

# Tk_call_two_functions.py

May 22nd, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. # Tk_call_two_functions.py
  2.  
  3. from Tkinter import *
  4.  
  5. admin = Tk()
  6. def one():
  7.     print 'one'
  8.  
  9. def two():
  10.     print 'two'
  11.  
  12. def multifunction(*args):
  13.     for function in args:
  14.         function()
  15.  
  16. one_and_two = lambda: multifunction(one, two)
  17. button = Button(admin, text='Press', command=one_and_two)
  18. button.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement