You have not sent any events to the update function. Generally it is done like this, i.e. sending some identifier to the function
from functools import partial ## rest of the code ## pack returns None so self.b1 and self.b2 are None Button(self.root,image=self.banane,width="30",height="30", command=partial(self.update, "b1")).pack(side=LEFT) Button(self.root,image=self.melone,width="30",height="30", command=partial(self.update, "b2")).pack(side=LEFT) def update(self, button_num): if button_num=="b1": self.label.config(text='Banane') elif button_num=="b2": self.label.config(text='Melone')