{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Interact Demos" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This Notebook shows basic demonstrations of IPython `interact` module. This provides a high-level interface for creating user interface controls to use in exploring code and data interactively." ] }, { "cell_type": "code", "collapsed": false, "input": [ "%pylab inline" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.html.widgets.interact import interact, interactive\n", "from IPython.html import widgets\n", "from IPython.display import clear_output, display, HTML" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Basic interact" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is a simple function that displays its arguments as an HTML table:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "def show_args(**kwargs):\n", " s = '
{0} | {1} |