btn = widgets.Button(description='Medium') display(btn) def btn_eventhandler(obj): print('Hello from the {} button!'.format(obj.description)) btn.on_click(btn_eventhandler)  In VSCode pressing the button does nothing. 