Why only some Tkinter callback functions need to have an argument but others don't
问题 I'm using Python 2.7, if that matters. Here is a code I wrote for fun: def p(): root = Tk() def cmd(event): print int(slider.get()) slider = Scale(root, orient = "horizontal", from_ = 0, to = 100, command = cmd, state = "disabled") def enable(): slider.config(state = "active") b = Button(root, text = "Enable slider", command = enable) b.grid() slider.grid(row = 1) root.mainloop() For this code, I'm wondering why the command for Scale requires an event, but that for Button does not. It seems