helloi must be going :\pp \gui\intropython gui py hello lambda world :\pp \gui\intropython gui py hello class method world :\pp \gui\intropython gui py hello __call__ world there are good reasons for each callback coding scheme (functionlambdaclass methodcallable class)but we need to move on to larger examples in order to uncover them in less theoretical terms other tkinter callback protocols for future referencealso keep in mind that using command options to intercept usergenerated button press events is just one way to register callbacks in tkinter in factthere are variety of ways for tkinter scripts to catch eventsbutton command options as we've just seenbutton press events are intercepted by providing callable object in widget command options this is true of other kinds of button-like widgets we'll meet in ( radio and check buttons and scalesmenu command options in the upcoming tkinter tour we'll also find that command option is used to specify callback handlers for menu selections scroll bar protocols scroll bar widgets register handlers with command optionstoobut they have unique event protocol that allows them to be cross-linked with the widget they are meant to scroll ( listboxestext displaysand canvases)moving the scroll bar automatically moves the widgetand vice versa general widget bind methods more general tkinter event bind method mechanism can be used to register callback handlers for lower-level interface events--key pressesmouse movement and clicksand so on unlike command callbacksbind callbacks receive an event object argument (an instance of the tkinter event classthat gives context about the event--subject widgetscreen coordinatesand so on window manager protocols in additionscripts can also intercept window manager events ( window close requestsby tapping into the window manager protocol method mechanism available on top-level window objects setting handler for wm_delete_windowfor instancetakes over window close buttons adding user-defined callback handlers