import ipywidgets as widgets
button = widgets.Button(description="Click Me!")
output = widgets.Output()
display(button, output)
def on_button_clicked():
print("button clicked")
button.on_click(on_button_clicked)
The button shows up.. but when I click on the button, I expect to see the message "button clicked" to show up. But that's not happening.
Is there something I'm missing here?
I am using vscode to run my jupyter notebook.