When I try to pass an argument to a button's function, it executes the function upon loading rather than when the button is pressed. When the button is pressed nothing happens. the code is something like this: self.mybutton = Button(parent, command = func(1)) self.mybutton.grid() def func(number): print str(number) What am I doing wrong?