code: def button(self, name, filename, command):
          '''add a button'''
          try:
              img = LoadImage(filename)
              b = Tkinter.Button(self.frame, image=img, command=command)
              b.image = img
          except Exception:
              b = Tkinter.Button(self.frame, text=filename, command=command)
          b.pack(side=Tkinter.LEFT)
          self.buttons[name] = f button(self, name, filename, command):
          '''add a button'''
          try:
              img = LoadImage(filename)
              b = Tkinter.Button(self.frame, image=img, command=command)
              b.image = img
          except Exception:
              b = Tkinter.Button(self.frame, text=filename, command=command)
          b.pack(side=Tkinter.LEFT)
          self.buttons[name] = b
docs: add a button