Skip to content

Instantly share code, notes, and snippets.

@lardissone
Created August 9, 2014 23:27
Show Gist options
  • Save lardissone/152f6ad3592d7b0cc3e7 to your computer and use it in GitHub Desktop.
Save lardissone/152f6ad3592d7b0cc3e7 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:e6edd11b960143e982f5361d4a335ec0c2beda3832bed11135750cbbeaadfa0e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from IPython.html import widgets\n",
"from IPython.display import display\n",
"\n",
"[widget for widget in dir(widgets) if widget.endswith('Widget')]\n",
"text = widgets.TextWidget()\n",
"display(text)\n",
"\n",
"int_range = widgets.IntSliderWidget()\n",
"display(int_range)\n",
"\n",
"def on_value_change(name, value):\n",
" text.value = str(value)\n",
" # print(value)\n",
"\n",
"int_range.on_trait_change(on_value_change, 'value')\n"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment