diff --git a/examples/widgets/D3.ipynb b/examples/widgets/D3.ipynb index ee39cb9..71ab413 100644 --- a/examples/widgets/D3.ipynb +++ b/examples/widgets/D3.ipynb @@ -967,7 +967,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -998,7 +998,19 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'modal'", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m floating_container.set_css({\n\u001b[1;32m 5\u001b[0m \u001b[0;34m'width'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'420px'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m 'height': '350px'}, selector='modal')\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mG\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mEventfulGraph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36mset_css\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 355\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 357\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mvalue\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 358\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 359\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msend_state\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'_css'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyError\u001b[0m: 'modal'" + ] + } + ], "prompt_number": 11 }, { @@ -1063,7 +1075,152 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "node set (1, {'stroke': 'black'})\n", + "node set (1, {'stroke': 'black', 'fill': 'red'})\n", + "node set (2, {'stroke': 'black'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (2, {'stroke': 'black', 'fill': 'gold'})\n", + "node set (3, {'stroke': 'black'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (3, {'stroke': 'black', 'fill': 'green'})\n", + "adj set (1, {2: {'distance': 200, 'stroke': 'lime'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (2, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px'}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})\n", + "adj set (3, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n", + "adj set (2, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n", + "adj set (3, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n", + "adj set (1, {2: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "adj set (1, {2: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "adj set (2, {1: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (1, {'stroke': 'black', 'r': 16, 'fill': 'red'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'red'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (2, {'stroke': 'black', 'r': 16, 'fill': 'gold'})\n", + "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'gold'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (3, {'stroke': 'black', 'r': 16, 'fill': 'green'})\n", + "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'green'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n", + "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'red'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n", + "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'gold'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n", + "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'green'})" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node del 1" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "node del 2\n", + "node del 3\n", + "node del hello\n", + "node del goodbye\n" + ] + } + ], "prompt_number": 12 }, { @@ -1185,7 +1342,19 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "TypeError", + "evalue": "isinstance() arg 2 must be a class, type, or tuple of classes and types", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mspeed\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mwidgets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFloatRangeWidget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mparent\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mbox\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmin\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.4\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.01\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbox\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mbox\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'well well-small'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mhandle_caclulate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36madd_class\u001b[0;34m(self, class_names, selector)\u001b[0m\n\u001b[1;32m 392\u001b[0m \"\"\"\n\u001b[1;32m 393\u001b[0m \u001b[0mclass_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mclass_names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 394\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlist\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclass_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 395\u001b[0m \u001b[0mclass_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m' '\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mclass_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: isinstance() arg 2 must be a class, type, or tuple of classes and types" + ] + } + ], "prompt_number": 15 }, { @@ -1215,7 +1384,18 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ImportError", + "evalue": "No module named twitter", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtwitter\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mtwitter_timestamp_format\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"%a %b %d %X +0000 %Y\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mImportError\u001b[0m: No module named twitter" + ] + } + ], "prompt_number": 16 }, { @@ -1234,7 +1414,18 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'OAuth' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Sign on to twitter.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m auth = OAuth(\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mconsumer_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'iQvYfTfuD86fgVWGjPY0UA'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mconsumer_secret\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'C3jjP6vzYzTYoHV4s5NYPGuRkpT5SulKRKTkRmYg'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mtoken\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'2218195843-cOPQa0D1Yk3JbvjvsCa0tIYzBOEWxINekmGcEql'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'OAuth' is not defined" + ] + } + ], "prompt_number": 17 }, { @@ -1329,7 +1520,19 @@ ], "language": "python", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'modal'", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 6\u001b[0m floating_container.set_css({\n\u001b[1;32m 7\u001b[0m \u001b[0;34m'width'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'620px'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m 'height': '450px'}, selector='modal')\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mgraph\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mEventfulGraph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36mset_css\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 355\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 357\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mvalue\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 358\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 359\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msend_state\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'_css'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyError\u001b[0m: 'modal'" + ] + } + ], "prompt_number": 18 }, { @@ -1342,14 +1545,34 @@ "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Service stopped\n" + "ename": "NameError", + "evalue": "name 'watch_tweets' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mwatch_tweets\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mscreen_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"justinbieber\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mNameError\u001b[0m: name 'watch_tweets' is not defined" ] } ], "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] } ], "metadata": {} diff --git a/examples/widgets/Part 1 - Basics.ipynb b/examples/widgets/Part 1 - Basics.ipynb index 4ceea70..2fcf1e6 100644 --- a/examples/widgets/Part 1 - Basics.ipynb +++ b/examples/widgets/Part 1 - Basics.ipynb @@ -81,12 +81,13 @@ "['BoolWidget',\n", " 'ButtonWidget',\n", " 'ContainerWidget',\n", + " 'DOMWidget',\n", " 'FloatRangeWidget',\n", " 'FloatWidget',\n", " 'ImageWidget',\n", " 'IntRangeWidget',\n", " 'IntWidget',\n", - " 'MulticontainerWidget',\n", + " 'SelectionContainerWidget',\n", " 'SelectionWidget',\n", " 'StringWidget',\n", " 'Widget']" @@ -143,13 +144,13 @@ { "metadata": {}, "output_type": "pyout", - "prompt_number": 13, + "prompt_number": 10, "text": [ - "42.7" + "50.6" ] } ], - "prompt_number": 13 + "prompt_number": 10 }, { "cell_type": "markdown", @@ -172,22 +173,22 @@ { "metadata": {}, "output_type": "pyout", - "prompt_number": 14, + "prompt_number": 11, "text": [ - "['visible',\n", - " '_css',\n", - " 'default_view_name',\n", - " 'value',\n", + "['value',\n", " 'step',\n", " 'max',\n", " 'min',\n", " 'disabled',\n", " 'orientation',\n", - " 'description']" + " 'description',\n", + " 'visible',\n", + " '_css',\n", + " 'view_name']" ] } ], - "prompt_number": 14 + "prompt_number": 11 }, { "cell_type": "markdown", @@ -205,7 +206,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 15 + "prompt_number": 12 }, { "cell_type": "markdown", @@ -226,13 +227,13 @@ { "metadata": {}, "output_type": "pyout", - "prompt_number": 16, + "prompt_number": 13, "text": [ "25.0" ] } ], - "prompt_number": 16 + "prompt_number": 13 }, { "cell_type": "markdown", @@ -251,7 +252,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 17 + "prompt_number": 14 }, { "cell_type": "code", @@ -265,13 +266,13 @@ { "metadata": {}, "output_type": "pyout", - "prompt_number": 18, + "prompt_number": 15, "text": [ - "u'Nothing Selected'" + "u'Item B'" ] } ], - "prompt_number": 18 + "prompt_number": 15 }, { "cell_type": "heading", diff --git a/examples/widgets/Part 2 - Events.ipynb b/examples/widgets/Part 2 - Events.ipynb index 435eb9f..83aa30c 100644 --- a/examples/widgets/Part 2 - Events.ipynb +++ b/examples/widgets/Part 2 - Events.ipynb @@ -25,7 +25,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 2 + "prompt_number": 1 }, { "cell_type": "heading", @@ -82,7 +82,7 @@ ] } ], - "prompt_number": 3 + "prompt_number": 2 }, { "cell_type": "markdown", @@ -117,13 +117,6 @@ "output_type": "stream", "stream": "stdout", "text": [ - "1\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ "2\n" ] }, @@ -131,20 +124,6 @@ "output_type": "stream", "stream": "stdout", "text": [ - "3\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ "5\n" ] }, @@ -152,263 +131,249 @@ "output_type": "stream", "stream": "stdout", "text": [ - "6\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "8\n" + "10\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "9\n" + "11\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "10\n" + "13\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "11\n" + "14\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "12\n" + "16\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "13\n" + "18\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "14\n" + "20\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "15\n" + "22\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "16\n" + "24\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "17\n" + "26\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "18\n" + "29\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "20\n" + "30\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "19\n" + "33\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "18\n" + "36\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "17\n" + "38\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "16\n" + "42\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "12\n" + "45\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "10\n" + "46\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "8\n" + "48\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "6\n" + "50\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "4\n" + "51\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "3\n" + "52\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "2\n" + "53\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "1\n" + "54\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "4\n" + "52\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "10\n" + "50\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "18\n" + "48\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "39\n" + "44\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "60\n" + "41\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "68\n" + "34\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "75\n" + "30\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "79\n" + "28\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "82\n" + "26\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "85\n" + "25\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "86\n" + "24\n" ] } ], - "prompt_number": 5 + "prompt_number": 3 }, { "cell_type": "heading", @@ -460,7 +425,7 @@ ] } ], - "prompt_number": 6 + "prompt_number": 4 }, { "cell_type": "markdown", @@ -490,116 +455,95 @@ "output_type": "stream", "stream": "stdout", "text": [ - "85\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "84\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "81\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "79\n" + "23\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "73\n" + "24\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "70\n" + "28\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "67\n" + "30\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "59\n" + "37\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "56\n" + "39\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "53\n" + "41\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "51\n" + "44\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "49\n" + "46\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "47\n" + "48\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "45\n" + "50\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "44\n" + "51\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ - "42\n" + "53\n" ] } ], - "prompt_number": 7 + "prompt_number": 5 }, { "cell_type": "code", @@ -622,15 +566,7 @@ "stream": "stdout", "text": [ "Button clicked.\n", - "43\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Button clicked.\n", - "44\n" + "54\n" ] }, { @@ -638,7 +574,7 @@ "stream": "stdout", "text": [ "Button clicked.\n", - "45\n" + "55\n" ] }, { @@ -646,35 +582,11 @@ "stream": "stdout", "text": [ "Button clicked.\n", - "46\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Button clicked.\n", - "47\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Button clicked.\n", - "48\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Button clicked.\n", - "49\n" + "56\n" ] } ], - "prompt_number": 8 + "prompt_number": 6 }, { "cell_type": "markdown", @@ -733,7 +645,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 9 + "prompt_number": 7 }, { "cell_type": "code",