Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from IPython.display import display, clear_output
  2.  
  3. # Creating and Displaying button
  4. button = widgets.Button(description="Button Text!")
  5. display(button)
  6.  
  7. # Callback function with button parameter
  8. def clicked(b):
  9. clear_output()
  10. print("Result of button click: ")
  11.  
  12. # Defining callback function
  13. button.on_click(clicked)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement