def fce(myX, myY):

    def wrapper(x=myX, y=myY):
        pass
pass
pass
return x + y
return wrapper
button1 = Tk.Button(mainWin, text='press 1', command=fce(1, 2))
button2 = Tk.Button(mainWin, text='press 2', command=fce(3, 4))
button3 = Tk.Button(mainWin, text='press 3', command=fce(9, 8))
How to pass arguments to a Button command in Tkinter?