Show More
@@ -17,6 +17,8 b'' | |||
|
17 | 17 | "cell_type": "code", |
|
18 | 18 | "collapsed": false, |
|
19 | 19 | "input": [ |
|
20 | "from __future__ import print_function # py 2.7 compat\n", | |
|
21 | "\n", | |
|
20 | 22 | "from IPython.html import widgets # Widget definitions\n", |
|
21 | 23 | "from IPython.display import display # Used to display widgets in the notebook" |
|
22 | 24 | ], |
@@ -156,7 +158,7 b'' | |||
|
156 | 158 | "metadata": {}, |
|
157 | 159 | "output_type": "display_data", |
|
158 | 160 | "text": [ |
|
159 |
"<IPython.core.display.Javascript at 0x |
|
|
161 | "<IPython.core.display.Javascript at 0x7f14f1c78cd0>" | |
|
160 | 162 | ] |
|
161 | 163 | } |
|
162 | 164 | ], |
@@ -178,14 +180,14 b'' | |||
|
178 | 180 | "display(file_widget)\n", |
|
179 | 181 | "\n", |
|
180 | 182 | "def file_loading():\n", |
|
181 |
" print |
|
|
183 | " print(\"Loading %s\" % file_widget.filename)\n", | |
|
182 | 184 | "\n", |
|
183 | 185 | "def file_loaded():\n", |
|
184 |
" print |
|
|
186 | " print(\"Loaded, file contents: %s\" % file_widget.value)\n", | |
|
185 | 187 | "\n", |
|
186 | 188 | "def file_failed(name, old_value, new_value):\n", |
|
187 | 189 | " if new_value > old_value:\n", |
|
188 |
" print |
|
|
190 | " print(\"Could not load file contents of %s\" % file_widget.filename)\n", | |
|
189 | 191 | "\n", |
|
190 | 192 | "\n", |
|
191 | 193 | "file_widget.on_trait_change(file_loading, 'filename')\n", |
@@ -206,8 +208,8 b'' | |||
|
206 | 208 | "output_type": "stream", |
|
207 | 209 | "stream": "stdout", |
|
208 | 210 | "text": [ |
|
209 | "Loaded, file contents: \n", | |
|
210 |
" |
|
|
211 | "Loaded, file contents: Hello World!\n", | |
|
212 | "\n" | |
|
211 | 213 | ] |
|
212 | 214 | } |
|
213 | 215 | ], |
@@ -16,7 +16,8 b'' | |||
|
16 | 16 | "import os\n", |
|
17 | 17 | "\n", |
|
18 | 18 | "from IPython.html import widgets\n", |
|
19 | "from IPython.display import display" | |
|
19 | "from IPython.display import display\n", | |
|
20 | "from IPython.utils.py3compat import bytes_to_str, string_types" | |
|
20 | 21 | ], |
|
21 | 22 | "language": "python", |
|
22 | 23 | "metadata": {}, |
@@ -91,7 +92,7 b'' | |||
|
91 | 92 | " try:\n", |
|
92 | 93 | " stdout = process.stdout.read()\n", |
|
93 | 94 | " if stdout is not None and len(stdout) > 0:\n", |
|
94 | " append_output(stdout)\n", | |
|
95 | " append_output(stdout, prefix=' ')\n", | |
|
95 | 96 | " except:\n", |
|
96 | 97 | " pass\n", |
|
97 | 98 | " \n", |
@@ -166,8 +167,13 b'' | |||
|
166 | 167 | "cell_type": "code", |
|
167 | 168 | "collapsed": false, |
|
168 | 169 | "input": [ |
|
169 | "def append_output(output, prefix=' '):\n", | |
|
170 | " output_lines = output.split('\\n')\n", | |
|
170 | "\n", | |
|
171 | "def append_output(output, prefix):\n", | |
|
172 | " if isinstance(output, string_types):\n", | |
|
173 | " output_str = output\n", | |
|
174 | " else:\n", | |
|
175 | " output_str = bytes_to_str(output)\n", | |
|
176 | " output_lines = output_str.split('\\n')\n", | |
|
171 | 177 | " formatted_output = '\\n'.join([prefix + line for line in output_lines if len(line) > 0]) + '\\n'\n", |
|
172 | 178 | " output_box.value += formatted_output\n", |
|
173 | 179 | " output_box.scroll_to_bottom()\n", |
@@ -17,6 +17,8 b'' | |||
|
17 | 17 | "cell_type": "code", |
|
18 | 18 | "collapsed": false, |
|
19 | 19 | "input": [ |
|
20 | "from __future__ import print_function # 2.7 compatability\n", | |
|
21 | "\n", | |
|
20 | 22 | "from IPython.html import widgets # Widget definitions\n", |
|
21 | 23 | "from IPython.display import display # Used to display widgets in the notebook" |
|
22 | 24 | ], |
@@ -104,7 +106,7 b'' | |||
|
104 | 106 | "display(intrange)\n", |
|
105 | 107 | "\n", |
|
106 | 108 | "def on_value_change(name, value):\n", |
|
107 |
" print |
|
|
109 | " print(value)\n", | |
|
108 | 110 | "\n", |
|
109 | 111 | "intrange.on_trait_change(on_value_change, 'value')" |
|
110 | 112 | ], |
@@ -115,21 +117,21 b'' | |||
|
115 | 117 | "output_type": "stream", |
|
116 | 118 | "stream": "stdout", |
|
117 | 119 | "text": [ |
|
118 |
"2 |
|
|
120 | "28\n" | |
|
119 | 121 | ] |
|
120 | 122 | }, |
|
121 | 123 | { |
|
122 | 124 | "output_type": "stream", |
|
123 | 125 | "stream": "stdout", |
|
124 | 126 | "text": [ |
|
125 |
" |
|
|
127 | "55\n" | |
|
126 | 128 | ] |
|
127 | 129 | }, |
|
128 | 130 | { |
|
129 | 131 | "output_type": "stream", |
|
130 | 132 | "stream": "stdout", |
|
131 | 133 | "text": [ |
|
132 |
"9 |
|
|
134 | "94\n" | |
|
133 | 135 | ] |
|
134 | 136 | } |
|
135 | 137 | ], |
@@ -29,6 +29,8 b'' | |||
|
29 | 29 | "cell_type": "code", |
|
30 | 30 | "collapsed": false, |
|
31 | 31 | "input": [ |
|
32 | "from __future__ import print_function # For py 2.7 compat\n", | |
|
33 | "\n", | |
|
32 | 34 | "from IPython.html import widgets # Widget definitions\n", |
|
33 | 35 | "from IPython.display import display # Used to display widgets in the notebook" |
|
34 | 36 | ], |
@@ -38,6 +40,25 b'' | |||
|
38 | 40 | "prompt_number": 1 |
|
39 | 41 | }, |
|
40 | 42 | { |
|
43 | "cell_type": "markdown", | |
|
44 | "metadata": {}, | |
|
45 | "source": [ | |
|
46 | "The 3 part of this tutorial requires the 3rd party `dateutil` library. https://pypi.python.org/pypi/python-dateutil" | |
|
47 | ] | |
|
48 | }, | |
|
49 | { | |
|
50 | "cell_type": "code", | |
|
51 | "collapsed": false, | |
|
52 | "input": [ | |
|
53 | "# Import the dateutil library to parse date strings.\n", | |
|
54 | "from dateutil import parser" | |
|
55 | ], | |
|
56 | "language": "python", | |
|
57 | "metadata": {}, | |
|
58 | "outputs": [], | |
|
59 | "prompt_number": 2 | |
|
60 | }, | |
|
61 | { | |
|
41 | 62 | "cell_type": "heading", |
|
42 | 63 | "level": 1, |
|
43 | 64 | "metadata": {}, |
@@ -91,7 +112,7 b'' | |||
|
91 | 112 | "language": "python", |
|
92 | 113 | "metadata": {}, |
|
93 | 114 | "outputs": [], |
|
94 |
"prompt_number": |
|
|
115 | "prompt_number": 3 | |
|
95 | 116 | }, |
|
96 | 117 | { |
|
97 | 118 | "cell_type": "markdown", |
@@ -139,11 +160,11 b'' | |||
|
139 | 160 | "metadata": {}, |
|
140 | 161 | "output_type": "display_data", |
|
141 | 162 | "text": [ |
|
142 |
"<IPython.core.display.Javascript at 0x |
|
|
163 | "<IPython.core.display.Javascript at 0x7f8c679289d0>" | |
|
143 | 164 | ] |
|
144 | 165 | } |
|
145 | 166 | ], |
|
146 |
"prompt_number": |
|
|
167 | "prompt_number": 4 | |
|
147 | 168 | }, |
|
148 | 169 | { |
|
149 | 170 | "cell_type": "markdown", |
@@ -181,11 +202,11 b'' | |||
|
181 | 202 | "metadata": {}, |
|
182 | 203 | "output_type": "display_data", |
|
183 | 204 | "text": [ |
|
184 |
"<IPython.core.display.Javascript at 0x |
|
|
205 | "<IPython.core.display.Javascript at 0x7f8c67928510>" | |
|
185 | 206 | ] |
|
186 | 207 | } |
|
187 | 208 | ], |
|
188 |
"prompt_number": |
|
|
209 | "prompt_number": 5 | |
|
189 | 210 | }, |
|
190 | 211 | { |
|
191 | 212 | "cell_type": "markdown", |
@@ -249,11 +270,11 b'' | |||
|
249 | 270 | "metadata": {}, |
|
250 | 271 | "output_type": "display_data", |
|
251 | 272 | "text": [ |
|
252 |
"<IPython.core.display.Javascript at 0x |
|
|
273 | "<IPython.core.display.Javascript at 0x7f8c67928a10>" | |
|
253 | 274 | ] |
|
254 | 275 | } |
|
255 | 276 | ], |
|
256 |
"prompt_number": |
|
|
277 | "prompt_number": 6 | |
|
257 | 278 | }, |
|
258 | 279 | { |
|
259 | 280 | "cell_type": "heading", |
@@ -280,7 +301,7 b'' | |||
|
280 | 301 | "language": "python", |
|
281 | 302 | "metadata": {}, |
|
282 | 303 | "outputs": [], |
|
283 |
"prompt_number": |
|
|
304 | "prompt_number": 7 | |
|
284 | 305 | }, |
|
285 | 306 | { |
|
286 | 307 | "cell_type": "heading", |
@@ -325,7 +346,7 b'' | |||
|
325 | 346 | "language": "python", |
|
326 | 347 | "metadata": {}, |
|
327 | 348 | "outputs": [], |
|
328 |
"prompt_number": |
|
|
349 | "prompt_number": 8 | |
|
329 | 350 | }, |
|
330 | 351 | { |
|
331 | 352 | "cell_type": "heading", |
@@ -405,11 +426,11 b'' | |||
|
405 | 426 | "metadata": {}, |
|
406 | 427 | "output_type": "display_data", |
|
407 | 428 | "text": [ |
|
408 |
"<IPython.core.display.Javascript at 0x |
|
|
429 | "<IPython.core.display.Javascript at 0x7f8c67928590>" | |
|
409 | 430 | ] |
|
410 | 431 | } |
|
411 | 432 | ], |
|
412 |
"prompt_number": |
|
|
433 | "prompt_number": 9 | |
|
413 | 434 | }, |
|
414 | 435 | { |
|
415 | 436 | "cell_type": "markdown", |
@@ -495,11 +516,11 b'' | |||
|
495 | 516 | "metadata": {}, |
|
496 | 517 | "output_type": "display_data", |
|
497 | 518 | "text": [ |
|
498 |
"<IPython.core.display.Javascript at 0x |
|
|
519 | "<IPython.core.display.Javascript at 0x7f8c648ce8d0>" | |
|
499 | 520 | ] |
|
500 | 521 | } |
|
501 | 522 | ], |
|
502 |
"prompt_number": |
|
|
523 | "prompt_number": 10 | |
|
503 | 524 | }, |
|
504 | 525 | { |
|
505 | 526 | "cell_type": "markdown", |
@@ -613,11 +634,11 b'' | |||
|
613 | 634 | "metadata": {}, |
|
614 | 635 | "output_type": "display_data", |
|
615 | 636 | "text": [ |
|
616 |
"<IPython.core.display.Javascript at 0x |
|
|
637 | "<IPython.core.display.Javascript at 0x7f8c648ce150>" | |
|
617 | 638 | ] |
|
618 | 639 | } |
|
619 | 640 | ], |
|
620 |
"prompt_number": 1 |
|
|
641 | "prompt_number": 11 | |
|
621 | 642 | }, |
|
622 | 643 | { |
|
623 | 644 | "cell_type": "heading", |
@@ -644,7 +665,7 b'' | |||
|
644 | 665 | "language": "python", |
|
645 | 666 | "metadata": {}, |
|
646 | 667 | "outputs": [], |
|
647 |
"prompt_number": 1 |
|
|
668 | "prompt_number": 12 | |
|
648 | 669 | }, |
|
649 | 670 | { |
|
650 | 671 | "cell_type": "markdown", |
@@ -662,7 +683,7 b'' | |||
|
662 | 683 | "language": "python", |
|
663 | 684 | "metadata": {}, |
|
664 | 685 | "outputs": [], |
|
665 |
"prompt_number": 1 |
|
|
686 | "prompt_number": 13 | |
|
666 | 687 | }, |
|
667 | 688 | { |
|
668 | 689 | "cell_type": "markdown", |
@@ -683,13 +704,13 b'' | |||
|
683 | 704 | { |
|
684 | 705 | "metadata": {}, |
|
685 | 706 | "output_type": "pyout", |
|
686 |
"prompt_number": 1 |
|
|
707 | "prompt_number": 14, | |
|
687 | 708 | "text": [ |
|
688 |
" |
|
|
709 | "'2013-11-28'" | |
|
689 | 710 | ] |
|
690 | 711 | } |
|
691 | 712 | ], |
|
692 |
"prompt_number": 1 |
|
|
713 | "prompt_number": 14 | |
|
693 | 714 | }, |
|
694 | 715 | { |
|
695 | 716 | "cell_type": "markdown", |
@@ -707,7 +728,7 b'' | |||
|
707 | 728 | "language": "python", |
|
708 | 729 | "metadata": {}, |
|
709 | 730 | "outputs": [], |
|
710 |
"prompt_number": 1 |
|
|
731 | "prompt_number": 15 | |
|
711 | 732 | }, |
|
712 | 733 | { |
|
713 | 734 | "cell_type": "heading", |
@@ -765,7 +786,7 b'' | |||
|
765 | 786 | "language": "python", |
|
766 | 787 | "metadata": {}, |
|
767 | 788 | "outputs": [], |
|
768 |
"prompt_number": 1 |
|
|
789 | "prompt_number": 16 | |
|
769 | 790 | }, |
|
770 | 791 | { |
|
771 | 792 | "cell_type": "markdown", |
@@ -778,8 +799,6 b'' | |||
|
778 | 799 | "cell_type": "code", |
|
779 | 800 | "collapsed": false, |
|
780 | 801 | "input": [ |
|
781 | "# Import the dateutil library to parse date strings.\n", | |
|
782 | "from dateutil import parser\n", | |
|
783 | 802 | "\n", |
|
784 | 803 | "# Import the base Widget class and the traitlets Unicode class.\n", |
|
785 | 804 | "from IPython.html.widgets import Widget\n", |
@@ -812,7 +831,7 b'' | |||
|
812 | 831 | "language": "python", |
|
813 | 832 | "metadata": {}, |
|
814 | 833 | "outputs": [], |
|
815 |
"prompt_number": 1 |
|
|
834 | "prompt_number": 17 | |
|
816 | 835 | }, |
|
817 | 836 | { |
|
818 | 837 | "cell_type": "markdown", |
@@ -860,7 +879,7 b'' | |||
|
860 | 879 | "language": "python", |
|
861 | 880 | "metadata": {}, |
|
862 | 881 | "outputs": [], |
|
863 |
"prompt_number": 1 |
|
|
882 | "prompt_number": 18 | |
|
864 | 883 | }, |
|
865 | 884 | { |
|
866 | 885 | "cell_type": "markdown", |
@@ -938,7 +957,7 b'' | |||
|
938 | 957 | "language": "python", |
|
939 | 958 | "metadata": {}, |
|
940 | 959 | "outputs": [], |
|
941 |
"prompt_number": 1 |
|
|
960 | "prompt_number": 19 | |
|
942 | 961 | }, |
|
943 | 962 | { |
|
944 | 963 | "cell_type": "heading", |
@@ -1094,11 +1113,11 b'' | |||
|
1094 | 1113 | "metadata": {}, |
|
1095 | 1114 | "output_type": "display_data", |
|
1096 | 1115 | "text": [ |
|
1097 |
"<IPython.core.display.Javascript at 0x |
|
|
1116 | "<IPython.core.display.Javascript at 0x7f8c679134d0>" | |
|
1098 | 1117 | ] |
|
1099 | 1118 | } |
|
1100 | 1119 | ], |
|
1101 |
"prompt_number": |
|
|
1120 | "prompt_number": 20 | |
|
1102 | 1121 | }, |
|
1103 | 1122 | { |
|
1104 | 1123 | "cell_type": "heading", |
@@ -1129,7 +1148,7 b'' | |||
|
1129 | 1148 | "language": "python", |
|
1130 | 1149 | "metadata": {}, |
|
1131 | 1150 | "outputs": [], |
|
1132 |
"prompt_number": 2 |
|
|
1151 | "prompt_number": 21 | |
|
1133 | 1152 | }, |
|
1134 | 1153 | { |
|
1135 | 1154 | "cell_type": "markdown", |
@@ -1147,7 +1166,7 b'' | |||
|
1147 | 1166 | "language": "python", |
|
1148 | 1167 | "metadata": {}, |
|
1149 | 1168 | "outputs": [], |
|
1150 |
"prompt_number": 2 |
|
|
1169 | "prompt_number": 22 | |
|
1151 | 1170 | }, |
|
1152 | 1171 | { |
|
1153 | 1172 | "cell_type": "markdown", |
@@ -1170,7 +1189,7 b'' | |||
|
1170 | 1189 | "language": "python", |
|
1171 | 1190 | "metadata": {}, |
|
1172 | 1191 | "outputs": [], |
|
1173 |
"prompt_number": 2 |
|
|
1192 | "prompt_number": 23 | |
|
1174 | 1193 | }, |
|
1175 | 1194 | { |
|
1176 | 1195 | "cell_type": "code", |
@@ -1182,7 +1201,7 b'' | |||
|
1182 | 1201 | "language": "python", |
|
1183 | 1202 | "metadata": {}, |
|
1184 | 1203 | "outputs": [], |
|
1185 |
"prompt_number": 2 |
|
|
1204 | "prompt_number": 24 | |
|
1186 | 1205 | }, |
|
1187 | 1206 | { |
|
1188 | 1207 | "cell_type": "code", |
@@ -1194,7 +1213,7 b'' | |||
|
1194 | 1213 | "language": "python", |
|
1195 | 1214 | "metadata": {}, |
|
1196 | 1215 | "outputs": [], |
|
1197 |
"prompt_number": 2 |
|
|
1216 | "prompt_number": 25 | |
|
1198 | 1217 | } |
|
1199 | 1218 | ], |
|
1200 | 1219 | "metadata": {} |
@@ -33,103 +33,6 b'' | |||
|
33 | 33 | "level": 3, |
|
34 | 34 | "metadata": {}, |
|
35 | 35 | "source": [ |
|
36 | "Custom SidePanel View" | |
|
37 | ] | |
|
38 | }, | |
|
39 | { | |
|
40 | "cell_type": "code", | |
|
41 | "collapsed": false, | |
|
42 | "input": [ | |
|
43 | "%%javascript\n", | |
|
44 | "\n", | |
|
45 | "require([\"notebook/js/widget\"], function(){\n", | |
|
46 | "\n", | |
|
47 | " // Define the FilePickerView\n", | |
|
48 | " var SidePanelView = IPython.WidgetView.extend({\n", | |
|
49 | " \n", | |
|
50 | " render: function(){ \n", | |
|
51 | " var table_div = $('<div />', {id: 'var_inspect'})\n", | |
|
52 | " .addClass('hbox');\n", | |
|
53 | " var body_div = $('<div />')\n", | |
|
54 | " .css('width', '80%')\n", | |
|
55 | " .css('height', '100%')\n", | |
|
56 | " .appendTo(table_div);\n", | |
|
57 | " this.panel_div = $('<div />')\n", | |
|
58 | " .css('width', '20%')\n", | |
|
59 | " .css('height', '100%')\n", | |
|
60 | " .appendTo(table_div);\n", | |
|
61 | " \n", | |
|
62 | " var body = $('body');\n", | |
|
63 | " var site = body.find('#site');\n", | |
|
64 | " site.detach();\n", | |
|
65 | " body.find('#var_inspect').remove();\n", | |
|
66 | " body.append(table_div);\n", | |
|
67 | " site.appendTo(body_div);\n", | |
|
68 | " },\n", | |
|
69 | "\n", | |
|
70 | " display_child: function(view) {\n", | |
|
71 | " this.panel_div.append(view.$el);\n", | |
|
72 | " },\n", | |
|
73 | " });\n", | |
|
74 | " \n", | |
|
75 | " // Register the DatePickerView with the widget manager.\n", | |
|
76 | " IPython.widget_manager.register_widget_view('SidePanelView', SidePanelView);\n", | |
|
77 | "});" | |
|
78 | ], | |
|
79 | "language": "python", | |
|
80 | "metadata": {}, | |
|
81 | "outputs": [ | |
|
82 | { | |
|
83 | "javascript": [ | |
|
84 | "\n", | |
|
85 | "require([\"notebook/js/widget\"], function(){\n", | |
|
86 | "\n", | |
|
87 | " // Define the FilePickerView\n", | |
|
88 | " var SidePanelView = IPython.WidgetView.extend({\n", | |
|
89 | " \n", | |
|
90 | " render: function(){ \n", | |
|
91 | " var table_div = $('<div />', {id: 'var_inspect'})\n", | |
|
92 | " .addClass('hbox');\n", | |
|
93 | " var body_div = $('<div />')\n", | |
|
94 | " .css('width', '80%')\n", | |
|
95 | " .css('height', '100%')\n", | |
|
96 | " .appendTo(table_div);\n", | |
|
97 | " this.panel_div = $('<div />')\n", | |
|
98 | " .css('width', '20%')\n", | |
|
99 | " .css('height', '100%')\n", | |
|
100 | " .appendTo(table_div);\n", | |
|
101 | " \n", | |
|
102 | " var body = $('body');\n", | |
|
103 | " var site = body.find('#site');\n", | |
|
104 | " site.detach();\n", | |
|
105 | " body.find('#var_inspect').remove();\n", | |
|
106 | " body.append(table_div);\n", | |
|
107 | " site.appendTo(body_div);\n", | |
|
108 | " },\n", | |
|
109 | "\n", | |
|
110 | " display_child: function(view) {\n", | |
|
111 | " this.panel_div.append(view.$el);\n", | |
|
112 | " },\n", | |
|
113 | " });\n", | |
|
114 | " \n", | |
|
115 | " // Register the DatePickerView with the widget manager.\n", | |
|
116 | " IPython.widget_manager.register_widget_view('SidePanelView', SidePanelView);\n", | |
|
117 | "});" | |
|
118 | ], | |
|
119 | "metadata": {}, | |
|
120 | "output_type": "display_data", | |
|
121 | "text": [ | |
|
122 | "<IPython.core.display.Javascript at 0x7f4e70015050>" | |
|
123 | ] | |
|
124 | } | |
|
125 | ], | |
|
126 | "prompt_number": 2 | |
|
127 | }, | |
|
128 | { | |
|
129 | "cell_type": "heading", | |
|
130 | "level": 3, | |
|
131 | "metadata": {}, | |
|
132 | "source": [ | |
|
133 | 36 | "Create Variable Inspector Controls" |
|
134 | 37 | ] |
|
135 | 38 | }, |
@@ -137,39 +40,31 b'' | |||
|
137 | 40 | "cell_type": "code", |
|
138 | 41 | "collapsed": false, |
|
139 | 42 | "input": [ |
|
140 |
"_ |
|
|
43 | "_popout = widgets.ContainerWidget(default_view_name=\"ModalView\")\n", | |
|
44 | "_popout.description = \"Variable Inspector\"\n", | |
|
45 | "_popout.button_text = _popout.description\n", | |
|
46 | "_popout.vbox()\n", | |
|
141 | 47 | "\n", |
|
142 |
"_modal_ |
|
|
143 | "_modal_div.set_css({'padding-top': '60px',\n", | |
|
144 | " 'padding-right': '40px',\n", | |
|
145 | " 'padding-left': '10px',})\n", | |
|
146 | "\n", | |
|
147 | "_modal_header = widgets.ContainerWidget(parent=_modal_div)\n", | |
|
148 | "_modal_header_label = widgets.StringWidget(parent=_modal_header, default_view_name=\"LabelView\")\n", | |
|
149 | "_modal_header_label.value = '<h3>Variable Inspector</h3>'\n", | |
|
150 | "_modal_header_execs_label = widgets.StringWidget(parent=_modal_header, default_view_name=\"LabelView\")\n", | |
|
48 | "_modal_header_execs_label = widgets.StringWidget(parent=_popout, default_view_name=\"LabelView\")\n", | |
|
151 | 49 | "_modal_header_execs_label.execs = 0\n", |
|
152 | 50 | "\n", |
|
153 |
"_modal_body = widgets.ContainerWidget(parent=_ |
|
|
154 |
"_modal_body. |
|
|
155 | "\n", | |
|
51 | "_modal_body = widgets.ContainerWidget(parent=_popout)\n", | |
|
52 | "_modal_body.flex1()\n", | |
|
53 | "_modal_body.set_css('overflow-y', 'scroll')\n", | |
|
156 | 54 | "_modal_body_label = widgets.StringWidget(parent=_modal_body, default_view_name=\"LabelView\")\n", |
|
157 | 55 | "_modal_body_label.value = 'Not hooked'\n", |
|
158 | 56 | "\n", |
|
159 |
"_modal_footer = widgets.ContainerWidget(parent=_ |
|
|
160 | "_modal_footer.vbox()\n", | |
|
57 | "_modal_footer = widgets.ContainerWidget(parent=_popout)\n", | |
|
161 | 58 | "_var_filter = widgets.SelectionWidget(values=['Public', 'Private', 'IPython'], parent=_modal_footer, value='Public', default_view_name='ToggleButtonsView')\n", |
|
162 | 59 | "\n", |
|
163 |
"display(_ |
|
|
60 | "display(_popout)\n", | |
|
164 | 61 | "\n", |
|
165 | "_modal_header.add_class('modal-header')\n", | |
|
166 | "_modal_body.add_class('modal-body')\n", | |
|
167 | 62 | "_modal_footer.add_class('modal-footer')\n" |
|
168 | 63 | ], |
|
169 | 64 | "language": "python", |
|
170 | 65 | "metadata": {}, |
|
171 | 66 | "outputs": [], |
|
172 |
"prompt_number": |
|
|
67 | "prompt_number": 2 | |
|
173 | 68 | }, |
|
174 | 69 | { |
|
175 | 70 | "cell_type": "heading", |
@@ -248,7 +143,7 b'' | |||
|
248 | 143 | "language": "python", |
|
249 | 144 | "metadata": {}, |
|
250 | 145 | "outputs": [], |
|
251 |
"prompt_number": |
|
|
146 | "prompt_number": 3 | |
|
252 | 147 | }, |
|
253 | 148 | { |
|
254 | 149 | "cell_type": "heading", |
@@ -282,7 +177,7 b'' | |||
|
282 | 177 | "language": "python", |
|
283 | 178 | "metadata": {}, |
|
284 | 179 | "outputs": [], |
|
285 |
"prompt_number": |
|
|
180 | "prompt_number": 4 | |
|
286 | 181 | }, |
|
287 | 182 | { |
|
288 | 183 | "cell_type": "heading", |
@@ -301,7 +196,7 b'' | |||
|
301 | 196 | "language": "python", |
|
302 | 197 | "metadata": {}, |
|
303 | 198 | "outputs": [], |
|
304 |
"prompt_number": |
|
|
199 | "prompt_number": 5 | |
|
305 | 200 | }, |
|
306 | 201 | { |
|
307 | 202 | "cell_type": "code", |
@@ -312,7 +207,7 b'' | |||
|
312 | 207 | "language": "python", |
|
313 | 208 | "metadata": {}, |
|
314 | 209 | "outputs": [], |
|
315 |
"prompt_number": |
|
|
210 | "prompt_number": 6 | |
|
316 | 211 | }, |
|
317 | 212 | { |
|
318 | 213 | "cell_type": "code", |
@@ -323,7 +218,7 b'' | |||
|
323 | 218 | "language": "python", |
|
324 | 219 | "metadata": {}, |
|
325 | 220 | "outputs": [], |
|
326 |
"prompt_number": |
|
|
221 | "prompt_number": 7 | |
|
327 | 222 | }, |
|
328 | 223 | { |
|
329 | 224 | "cell_type": "code", |
@@ -334,7 +229,7 b'' | |||
|
334 | 229 | "language": "python", |
|
335 | 230 | "metadata": {}, |
|
336 | 231 | "outputs": [], |
|
337 |
"prompt_number": |
|
|
232 | "prompt_number": 8 | |
|
338 | 233 | }, |
|
339 | 234 | { |
|
340 | 235 | "cell_type": "code", |
@@ -345,7 +240,7 b'' | |||
|
345 | 240 | "language": "python", |
|
346 | 241 | "metadata": {}, |
|
347 | 242 | "outputs": [], |
|
348 |
"prompt_number": |
|
|
243 | "prompt_number": 9 | |
|
349 | 244 | } |
|
350 | 245 | ], |
|
351 | 246 | "metadata": {} |
General Comments 0
You need to be logged in to leave comments.
Login now