O'Reilly logo

Learning Jupyter by Dan Toomey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6.  Interactive Widgets

There is a mechanism built for Jupyter to gather input from the user as the script is running. To do this, we put in coding in the form of a widget or user interface control in the script. The widgets we will use in this chapter are defined at http://ipywidgets.readthedocs.io/en/latest/ .

There are widgets for the following:

  • Text input: Notebook users enter a string that will be used later in the script.
  • Button clicks: The user is presented with multiple options in the form of buttons; then, depending on which button is selected (clicked on), your script can change direction according to the user.
  • Slider: You can provide the user with a slider with which the user can select a value within the range you specify, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required