Show More
This diff has been collapsed as it changes many lines, (591 lines changed) Show them Hide them | |||||
@@ -12,235 +12,556 b'' | |||||
12 | "level": 1, |
|
12 | "level": 1, | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 |
" |
|
15 | "Variable Inspector Widget" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 |
"cell_type": " |
|
19 | "cell_type": "heading", | |
20 |
" |
|
20 | "level": 2, | |
21 | "input": [ |
|
|||
22 | "from IPython.html import widgets\n", |
|
|||
23 | "from IPython.display import display\n", |
|
|||
24 | "import re" |
|
|||
25 | ], |
|
|||
26 | "language": "python", |
|
|||
27 | "metadata": {}, |
|
21 | "metadata": {}, | |
28 |
" |
|
22 | "source": [ | |
29 | "prompt_number": 1 |
|
23 | "A short example implementation." | |
|
24 | ] | |||
30 | }, |
|
25 | }, | |
31 | { |
|
26 | { | |
32 |
"cell_type": " |
|
27 | "cell_type": "markdown", | |
33 | "level": 3, |
|
|||
34 | "metadata": {}, |
|
28 | "metadata": {}, | |
35 | "source": [ |
|
29 | "source": [ | |
36 | "Create Variable Inspector Controls" |
|
30 | "This notebook demonstrates how one can use the widgets already built-in to IPython to create a working variable inspector much like the ones seen in popular commercial scientific computing environments." | |
37 | ] |
|
31 | ] | |
38 | }, |
|
32 | }, | |
39 | { |
|
33 | { | |
40 | "cell_type": "code", |
|
34 | "cell_type": "code", | |
41 | "collapsed": false, |
|
35 | "collapsed": false, | |
42 | "input": [ |
|
36 | "input": [ | |
43 | "_popout = widgets.ContainerWidget(default_view_name=\"ModalView\")\n", |
|
37 | "class VariableInspectorWindow(object):\n", | |
44 | "_popout.description = \"Variable Inspector\"\n", |
|
38 | " \n", | |
45 | "_popout.button_text = _popout.description\n", |
|
39 | " # For this example file, the import sit inside the class, just to avoid poluting \n", | |
46 | "_popout.vbox()\n", |
|
40 | " # the namespace further.\n", | |
|
41 | " from IPython.html import widgets # Loads the Widget framework.\n", | |||
|
42 | " from IPython.core.magics.namespace import NamespaceMagics # Used to query namespace.\n", | |||
|
43 | " \n", | |||
|
44 | " instance = None\n", | |||
|
45 | " \n", | |||
|
46 | " def __init__(self, ipython):\n", | |||
|
47 | " \"\"\"Public constructor.\"\"\"\n", | |||
|
48 | " if VariableInspectorWindow.instance is not None:\n", | |||
|
49 | " raise Exception(\"\"\"Only one instance of the Variable Inspector can exist at a \n", | |||
|
50 | " time. Call close() on the active instance before creating a new instance.\n", | |||
|
51 | " If you have lost the handle to the active instance, you can re-obtain it\n", | |||
|
52 | " via `VariableInspectorWindow.instance`.\"\"\")\n", | |||
|
53 | " \n", | |||
|
54 | " VariableInspectorWindow.instance = self\n", | |||
|
55 | " self.closed = False\n", | |||
|
56 | " self.namespace = self.NamespaceMagics()\n", | |||
|
57 | " self.namespace.shell = ipython.kernel.shell\n", | |||
|
58 | " \n", | |||
|
59 | " self._popout = self.widgets.PopupWidget()\n", | |||
|
60 | " self._popout.description = \"Variable Inspector\"\n", | |||
|
61 | " self._popout.button_text = self._popout.description\n", | |||
47 | "\n", |
|
62 | "\n", | |
48 | "_modal_header_execs_label = widgets.StringWidget(parent=_popout, default_view_name=\"HTMLView\")\n", |
|
63 | " self._modal_body = self.widgets.ContainerWidget()\n", | |
49 | "_modal_header_execs_label.execs = 0\n", |
|
64 | " self._modal_body.set_css('overflow-y', 'scroll')\n", | |
50 | "\n", |
|
65 | "\n", | |
51 |
"_modal_body = widgets. |
|
66 | " self._modal_body_label = self.widgets.HTMLWidget(value = 'Not hooked')\n", | |
52 | "_modal_body.flex1()\n", |
|
67 | " self._modal_body.children = [self._modal_body_label]\n", | |
53 | "_modal_body.set_css('overflow-y', 'scroll')\n", |
|
|||
54 | "_modal_body_label = widgets.StringWidget(parent=_modal_body, default_view_name=\"HTMLView\")\n", |
|
|||
55 | "_modal_body_label.value = 'Not hooked'\n", |
|
|||
56 | "\n", |
|
68 | "\n", | |
57 |
"_modal_footer = widgets.ContainerWidget( |
|
69 | " self._modal_footer = self.widgets.ContainerWidget()\n", | |
58 | "_var_filter = widgets.SelectionWidget(values=['Public', 'Private', 'IPython'], parent=_modal_footer, value='Public', default_view_name='ToggleButtonsView')\n", |
|
70 | " self._var_filter = self.widgets.ToggleButtonsWidget(description=\"Method:\", values=['List', 'Details'], value='List')\n", | |
|
71 | " self._modal_footer.children = [self._var_filter]\n", | |||
59 | "\n", |
|
72 | "\n", | |
60 | "display(_popout)\n", |
|
73 | " self._popout.children = [\n", | |
|
74 | " self._modal_body, \n", | |||
|
75 | " self._modal_footer,\n", | |||
|
76 | " ]\n", | |||
|
77 | " \n", | |||
|
78 | " self._ipython = ipython\n", | |||
|
79 | " self._ipython.register_post_execute(self._fill)\n", | |||
|
80 | " self._var_filter.on_trait_change(self._fill, 'value')\n", | |||
|
81 | "\n", | |||
|
82 | " def close(self):\n", | |||
|
83 | " \"\"\"Close and remove hooks.\"\"\"\n", | |||
|
84 | " if not self.closed:\n", | |||
|
85 | " del self._ipython._post_execute[self._fill]\n", | |||
|
86 | " self._popout.close()\n", | |||
|
87 | " self.closed = True\n", | |||
|
88 | " VariableInspectorWindow.instance = None\n", | |||
|
89 | "\n", | |||
|
90 | " def _fill(self):\n", | |||
|
91 | " \"\"\"Fill self with variable information.\"\"\"\n", | |||
|
92 | " values = self.namespace.who_ls()\n", | |||
|
93 | " mode = self._var_filter.value\n", | |||
|
94 | " if mode == \"List\":\n", | |||
|
95 | " self._modal_body_label.value = '<br>'.join(values)\n", | |||
|
96 | " elif mode == \"Details\":\n", | |||
|
97 | " self._modal_body_label.value = '<table class=\"table table-bordered table-striped\"><tr><th>Name</th><th>Type</th><th>Value</th></tr><tr><td>' + \\\n", | |||
|
98 | " '</td></tr><tr><td>'.join(['{0}</td><td>{1}</td><td>{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n", | |||
|
99 | " '</td></tr></table>'\n", | |||
61 | "\n", |
|
100 | "\n", | |
62 | "_modal_footer.add_class('modal-footer')\n" |
|
101 | " def _ipython_display_(self):\n", | |
|
102 | " \"\"\"Called when display() or pyout is used to display the Variable \n", | |||
|
103 | " Inspector.\"\"\"\n", | |||
|
104 | " self._popout._ipython_display_()\n", | |||
|
105 | " self._modal_footer.add_class('modal-footer')\n", | |||
|
106 | " self._popout.add_class('vbox')\n", | |||
|
107 | " self._modal_body.add_class('box-flex1')\n" | |||
63 | ], |
|
108 | ], | |
64 | "language": "python", |
|
109 | "language": "python", | |
65 | "metadata": {}, |
|
110 | "metadata": {}, | |
66 | "outputs": [], |
|
111 | "outputs": [], | |
67 |
"prompt_number": |
|
112 | "prompt_number": 17 | |
68 | }, |
|
|||
69 | { |
|
|||
70 | "cell_type": "heading", |
|
|||
71 | "level": 3, |
|
|||
72 | "metadata": {}, |
|
|||
73 | "source": [ |
|
|||
74 | "Method that Fills the Inspector" |
|
|||
75 | ] |
|
|||
76 | }, |
|
113 | }, | |
77 | { |
|
114 | { | |
78 | "cell_type": "code", |
|
115 | "cell_type": "code", | |
79 | "collapsed": false, |
|
116 | "collapsed": false, | |
80 | "input": [ |
|
117 | "input": [ | |
81 | "_ipython_input = re.compile('_i[0-9]*')\n", |
|
118 | "inspector = VariableInspectorWindow(get_ipython())\n", | |
82 |
" |
|
119 | "inspector" | |
83 | "def _fill_inspector():\n", |
|
|||
84 | " \n", |
|
|||
85 | " # Apply filter to variable names.\n", |
|
|||
86 | " names = []\n", |
|
|||
87 | " for name in sorted(_ipython.user_ns):\n", |
|
|||
88 | " \n", |
|
|||
89 | " match = _ipython_input.match(name)\n", |
|
|||
90 | " is_ipython = (match is not None and match.group() == name) or \\\n", |
|
|||
91 | " name == '_dh' or \\\n", |
|
|||
92 | " name == '_ih' or \\\n", |
|
|||
93 | " name == '_ii' or \\\n", |
|
|||
94 | " name == '_iii' or \\\n", |
|
|||
95 | " name == '_oh' or \\\n", |
|
|||
96 | " name == '_sh' or \\\n", |
|
|||
97 | " name == 'get_ipython' or \\\n", |
|
|||
98 | " name == 'In' or \\\n", |
|
|||
99 | " name == 'Out' or \\\n", |
|
|||
100 | " name == 'exit' or \\\n", |
|
|||
101 | " name == 'help' or \\\n", |
|
|||
102 | " name == 'quit' or \\\n", |
|
|||
103 | " name == '_' or \\\n", |
|
|||
104 | " name == '__' or \\\n", |
|
|||
105 | " name == '___'\n", |
|
|||
106 | " \n", |
|
|||
107 | " is_private = name.startswith('_')\n", |
|
|||
108 | " is_public = not is_private\n", |
|
|||
109 | " \n", |
|
|||
110 | " var_filter = _var_filter.value\n", |
|
|||
111 | " if var_filter == 'IPython' and is_ipython:\n", |
|
|||
112 | " names.append(name)\n", |
|
|||
113 | " elif var_filter == 'Private' and (is_private and not is_ipython):\n", |
|
|||
114 | " names.append(name)\n", |
|
|||
115 | " elif var_filter == 'Public' and (is_public and not is_ipython):\n", |
|
|||
116 | " names.append(name)\n", |
|
|||
117 | " \n", |
|
|||
118 | " # Render each name and it's value.\n", |
|
|||
119 | " variable_list_html = \"\"\"\n", |
|
|||
120 | "<table class=\"table table-bordered table-striped\" style=\"width: 100%; overflow: hidden; table-layout:fixed;\">\n", |
|
|||
121 | " <tr><th>Name</th><th>Type</th><th>Value</th>\"\"\"\n", |
|
|||
122 | " for name in names:\n", |
|
|||
123 | " var_value = _ipython.user_ns[name]\n", |
|
|||
124 | " var_type = type(var_value)\n", |
|
|||
125 | " var_small_value = str(var_value)[:100].replace(\"&\", \"&\").replace(\"<\", \"<\")\n", |
|
|||
126 | " \n", |
|
|||
127 | " if str(var_value) != var_small_value:\n", |
|
|||
128 | " var_small_value += '<br><div class=\"label label-info\">...</div>'\n", |
|
|||
129 | " \n", |
|
|||
130 | " row = \"\"\"\n", |
|
|||
131 | "<tr style='overflow: hidden;'>\n", |
|
|||
132 | " <td style='width: 30%; overflow: hidden;'>{name}</td>\n", |
|
|||
133 | " <td style='width: 30%; overflow: hidden;'>{type}</td>\n", |
|
|||
134 | " <td style='width: 40%; overflow: hidden;'>{small_value}</td>\n", |
|
|||
135 | "</tr>\n", |
|
|||
136 | "\"\"\".format(name=name, type=var_type.__name__, small_value=var_small_value, value=str(var_value))\n", |
|
|||
137 | " variable_list_html += row + '\\n'\n", |
|
|||
138 | " variable_list_html += '</table>'\n", |
|
|||
139 | " _modal_body_label.value = variable_list_html\n", |
|
|||
140 | " \n", |
|
|||
141 | " " |
|
|||
142 | ], |
|
120 | ], | |
143 | "language": "python", |
|
121 | "language": "python", | |
144 | "metadata": {}, |
|
122 | "metadata": {}, | |
145 | "outputs": [], |
|
123 | "outputs": [], | |
146 |
"prompt_number": |
|
124 | "prompt_number": 18 | |
147 | }, |
|
125 | }, | |
148 | { |
|
126 | { | |
149 | "cell_type": "heading", |
|
127 | "cell_type": "heading", | |
150 |
"level": |
|
128 | "level": 1, | |
151 | "metadata": {}, |
|
129 | "metadata": {}, | |
152 | "source": [ |
|
130 | "source": [ | |
153 | "Hook Cell Execute and Filter Change" |
|
131 | "Test" | |
154 | ] |
|
132 | ] | |
155 | }, |
|
133 | }, | |
156 | { |
|
134 | { | |
157 | "cell_type": "code", |
|
135 | "cell_type": "code", | |
158 | "collapsed": false, |
|
136 | "collapsed": false, | |
159 | "input": [ |
|
137 | "input": [ | |
160 | "_ipython = get_ipython()\n", |
|
138 | "a = 5" | |
161 | "\n", |
|
|||
162 | "try:\n", |
|
|||
163 | " del _ipython._post_execute[handle_cell_executed]\n", |
|
|||
164 | "except:\n", |
|
|||
165 | " pass\n", |
|
|||
166 | "\n", |
|
|||
167 | "def _handle_cell_executed():\n", |
|
|||
168 | " _modal_header_execs_label.execs += 1\n", |
|
|||
169 | " _modal_header_execs_label.value = '%d cell executions captured' % _modal_header_execs_label.execs\n", |
|
|||
170 | " _fill_inspector()\n", |
|
|||
171 | "_ipython.register_post_execute(_handle_cell_executed)\n", |
|
|||
172 | "\n", |
|
|||
173 | "def _handle_filter_changed():\n", |
|
|||
174 | " _fill_inspector()\n", |
|
|||
175 | "_var_filter.on_trait_change(_handle_filter_changed, 'value')" |
|
|||
176 | ], |
|
139 | ], | |
177 | "language": "python", |
|
140 | "language": "python", | |
178 | "metadata": {}, |
|
141 | "metadata": {}, | |
179 | "outputs": [], |
|
142 | "outputs": [], | |
180 |
"prompt_number": |
|
143 | "prompt_number": 11 | |
181 | }, |
|
144 | }, | |
182 | { |
|
145 | { | |
183 |
"cell_type": " |
|
146 | "cell_type": "code", | |
184 |
" |
|
147 | "collapsed": false, | |
|
148 | "input": [ | |||
|
149 | "b = 3.0" | |||
|
150 | ], | |||
|
151 | "language": "python", | |||
185 | "metadata": {}, |
|
152 | "metadata": {}, | |
186 |
" |
|
153 | "outputs": [], | |
187 | "Test" |
|
154 | "prompt_number": 12 | |
188 | ] |
|
|||
189 | }, |
|
155 | }, | |
190 | { |
|
156 | { | |
191 | "cell_type": "code", |
|
157 | "cell_type": "code", | |
192 | "collapsed": false, |
|
158 | "collapsed": false, | |
193 | "input": [ |
|
159 | "input": [ | |
194 |
" |
|
160 | "c = a * b" | |
195 | ], |
|
161 | ], | |
196 | "language": "python", |
|
162 | "language": "python", | |
197 | "metadata": {}, |
|
163 | "metadata": {}, | |
198 | "outputs": [], |
|
164 | "outputs": [], | |
199 |
"prompt_number": |
|
165 | "prompt_number": 13 | |
200 | }, |
|
166 | }, | |
201 | { |
|
167 | { | |
202 | "cell_type": "code", |
|
168 | "cell_type": "code", | |
203 | "collapsed": false, |
|
169 | "collapsed": false, | |
204 | "input": [ |
|
170 | "input": [ | |
205 | "b = 3.0" |
|
171 | "d = \"String\"" | |
206 | ], |
|
172 | ], | |
207 | "language": "python", |
|
173 | "language": "python", | |
208 | "metadata": {}, |
|
174 | "metadata": {}, | |
209 | "outputs": [], |
|
175 | "outputs": [], | |
210 |
"prompt_number": |
|
176 | "prompt_number": 14 | |
211 | }, |
|
177 | }, | |
212 | { |
|
178 | { | |
213 | "cell_type": "code", |
|
179 | "cell_type": "code", | |
214 | "collapsed": false, |
|
180 | "collapsed": false, | |
215 | "input": [ |
|
181 | "input": [ | |
216 |
" |
|
182 | "del b" | |
217 | ], |
|
183 | ], | |
218 | "language": "python", |
|
184 | "language": "python", | |
219 | "metadata": {}, |
|
185 | "metadata": {}, | |
220 | "outputs": [], |
|
186 | "outputs": [], | |
221 |
"prompt_number": |
|
187 | "prompt_number": 15 | |
222 | }, |
|
188 | }, | |
223 | { |
|
189 | { | |
224 | "cell_type": "code", |
|
190 | "cell_type": "code", | |
225 | "collapsed": false, |
|
191 | "collapsed": false, | |
226 | "input": [ |
|
192 | "input": [ | |
227 | "d = \"String\"" |
|
193 | "?" | |
228 | ], |
|
194 | ], | |
229 | "language": "python", |
|
195 | "language": "python", | |
230 | "metadata": {}, |
|
196 | "metadata": {}, | |
231 | "outputs": [], |
|
197 | "outputs": [], | |
232 |
"prompt_number": |
|
198 | "prompt_number": 16 | |
233 | }, |
|
199 | }, | |
234 | { |
|
200 | { | |
235 | "cell_type": "code", |
|
201 | "cell_type": "code", | |
236 | "collapsed": false, |
|
202 | "collapsed": false, | |
237 | "input": [ |
|
203 | "input": [ | |
238 |
"d |
|
204 | "dir()" | |
239 | ], |
|
205 | ], | |
240 | "language": "python", |
|
206 | "language": "python", | |
241 | "metadata": {}, |
|
207 | "metadata": {}, | |
242 |
"outputs": [ |
|
208 | "outputs": [ | |
243 | "prompt_number": 9 |
|
209 | { | |
|
210 | "metadata": {}, | |||
|
211 | "output_type": "pyout", | |||
|
212 | "prompt_number": 15, | |||
|
213 | "text": [ | |||
|
214 | "['In',\n", | |||
|
215 | " 'Out',\n", | |||
|
216 | " 'VariableInspectorWindow',\n", | |||
|
217 | " '_',\n", | |||
|
218 | " '_10',\n", | |||
|
219 | " '_14',\n", | |||
|
220 | " '__',\n", | |||
|
221 | " '___',\n", | |||
|
222 | " '__builtin__',\n", | |||
|
223 | " '__builtins__',\n", | |||
|
224 | " '__doc__',\n", | |||
|
225 | " '__name__',\n", | |||
|
226 | " '__package__',\n", | |||
|
227 | " '_dh',\n", | |||
|
228 | " '_i',\n", | |||
|
229 | " '_i1',\n", | |||
|
230 | " '_i10',\n", | |||
|
231 | " '_i11',\n", | |||
|
232 | " '_i12',\n", | |||
|
233 | " '_i13',\n", | |||
|
234 | " '_i14',\n", | |||
|
235 | " '_i15',\n", | |||
|
236 | " '_i2',\n", | |||
|
237 | " '_i3',\n", | |||
|
238 | " '_i4',\n", | |||
|
239 | " '_i5',\n", | |||
|
240 | " '_i6',\n", | |||
|
241 | " '_i7',\n", | |||
|
242 | " '_i8',\n", | |||
|
243 | " '_i9',\n", | |||
|
244 | " '_ih',\n", | |||
|
245 | " '_ii',\n", | |||
|
246 | " '_iii',\n", | |||
|
247 | " '_oh',\n", | |||
|
248 | " '_sh',\n", | |||
|
249 | " 'exit',\n", | |||
|
250 | " 'get_ipython',\n", | |||
|
251 | " 'quit',\n", | |||
|
252 | " 'widgets']" | |||
|
253 | ] | |||
|
254 | } | |||
|
255 | ], | |||
|
256 | "prompt_number": 15 | |||
|
257 | }, | |||
|
258 | { | |||
|
259 | "cell_type": "code", | |||
|
260 | "collapsed": false, | |||
|
261 | "input": [ | |||
|
262 | "dir(get_ipython().kernel.shell)" | |||
|
263 | ], | |||
|
264 | "language": "python", | |||
|
265 | "metadata": {}, | |||
|
266 | "outputs": [ | |||
|
267 | { | |||
|
268 | "metadata": {}, | |||
|
269 | "output_type": "pyout", | |||
|
270 | "prompt_number": 4, | |||
|
271 | "text": [ | |||
|
272 | "['Completer',\n", | |||
|
273 | " 'CustomTB',\n", | |||
|
274 | " 'InteractiveTB',\n", | |||
|
275 | " 'SyntaxTB',\n", | |||
|
276 | " '__class__',\n", | |||
|
277 | " '__delattr__',\n", | |||
|
278 | " '__dict__',\n", | |||
|
279 | " '__doc__',\n", | |||
|
280 | " '__format__',\n", | |||
|
281 | " '__getattribute__',\n", | |||
|
282 | " '__hash__',\n", | |||
|
283 | " '__init__',\n", | |||
|
284 | " '__module__',\n", | |||
|
285 | " '__new__',\n", | |||
|
286 | " '__reduce__',\n", | |||
|
287 | " '__reduce_ex__',\n", | |||
|
288 | " '__repr__',\n", | |||
|
289 | " '__setattr__',\n", | |||
|
290 | " '__sizeof__',\n", | |||
|
291 | " '__str__',\n", | |||
|
292 | " '__subclasshook__',\n", | |||
|
293 | " '__weakref__',\n", | |||
|
294 | " '_add_notifiers',\n", | |||
|
295 | " '_call_pdb',\n", | |||
|
296 | " '_config_changed',\n", | |||
|
297 | " '_exit_now_changed',\n", | |||
|
298 | " '_exiter_default',\n", | |||
|
299 | " '_find_my_config',\n", | |||
|
300 | " '_format_user_obj',\n", | |||
|
301 | " '_get_call_pdb',\n", | |||
|
302 | " '_get_exc_info',\n", | |||
|
303 | " '_indent_current_str',\n", | |||
|
304 | " '_inspect',\n", | |||
|
305 | " '_instance',\n", | |||
|
306 | " '_ipython_dir_changed',\n", | |||
|
307 | " '_last_input_line',\n", | |||
|
308 | " '_load_config',\n", | |||
|
309 | " '_main_mod_cache',\n", | |||
|
310 | " '_notify_trait',\n", | |||
|
311 | " '_object_find',\n", | |||
|
312 | " '_ofind',\n", | |||
|
313 | " '_ofind_property',\n", | |||
|
314 | " '_orig_sys_module_state',\n", | |||
|
315 | " '_orig_sys_modules_main_mod',\n", | |||
|
316 | " '_orig_sys_modules_main_name',\n", | |||
|
317 | " '_post_execute',\n", | |||
|
318 | " '_prompt_in1_changed',\n", | |||
|
319 | " '_prompt_in2_changed',\n", | |||
|
320 | " '_prompt_out_changed',\n", | |||
|
321 | " '_prompt_pad_left_changed',\n", | |||
|
322 | " '_prompt_trait_changed',\n", | |||
|
323 | " '_remove_notifiers',\n", | |||
|
324 | " '_reply_content',\n", | |||
|
325 | " '_run_cached_cell_magic',\n", | |||
|
326 | " '_set_call_pdb',\n", | |||
|
327 | " '_showtraceback',\n", | |||
|
328 | " '_trait_dyn_inits',\n", | |||
|
329 | " '_trait_notifiers',\n", | |||
|
330 | " '_trait_values',\n", | |||
|
331 | " '_user_obj_error',\n", | |||
|
332 | " '_walk_mro',\n", | |||
|
333 | " 'alias_manager',\n", | |||
|
334 | " 'all_ns_refs',\n", | |||
|
335 | " 'ask_exit',\n", | |||
|
336 | " 'ask_yes_no',\n", | |||
|
337 | " 'ast_node_interactivity',\n", | |||
|
338 | " 'ast_transformers',\n", | |||
|
339 | " 'atexit_operations',\n", | |||
|
340 | " 'auto_rewrite_input',\n", | |||
|
341 | " 'autocall',\n", | |||
|
342 | " 'autoindent',\n", | |||
|
343 | " 'automagic',\n", | |||
|
344 | " 'builtin_trap',\n", | |||
|
345 | " 'cache_size',\n", | |||
|
346 | " 'call_pdb',\n", | |||
|
347 | " 'class_config_section',\n", | |||
|
348 | " 'class_get_help',\n", | |||
|
349 | " 'class_get_trait_help',\n", | |||
|
350 | " 'class_print_help',\n", | |||
|
351 | " 'class_trait_names',\n", | |||
|
352 | " 'class_traits',\n", | |||
|
353 | " 'cleanup',\n", | |||
|
354 | " 'clear_instance',\n", | |||
|
355 | " 'clear_main_mod_cache',\n", | |||
|
356 | " 'color_info',\n", | |||
|
357 | " 'colors',\n", | |||
|
358 | " 'colors_force',\n", | |||
|
359 | " 'comm_manager',\n", | |||
|
360 | " 'compile',\n", | |||
|
361 | " 'complete',\n", | |||
|
362 | " 'config',\n", | |||
|
363 | " 'configurables',\n", | |||
|
364 | " 'custom_exceptions',\n", | |||
|
365 | " 'data_pub',\n", | |||
|
366 | " 'data_pub_class',\n", | |||
|
367 | " 'db',\n", | |||
|
368 | " 'debug',\n", | |||
|
369 | " 'debugger',\n", | |||
|
370 | " 'deep_reload',\n", | |||
|
371 | " 'default_user_namespaces',\n", | |||
|
372 | " 'define_macro',\n", | |||
|
373 | " 'define_magic',\n", | |||
|
374 | " 'del_var',\n", | |||
|
375 | " 'dir_stack',\n", | |||
|
376 | " 'disable_failing_post_execute',\n", | |||
|
377 | " 'display_formatter',\n", | |||
|
378 | " 'display_pub',\n", | |||
|
379 | " 'display_pub_class',\n", | |||
|
380 | " 'display_trap',\n", | |||
|
381 | " 'displayhook',\n", | |||
|
382 | " 'displayhook_class',\n", | |||
|
383 | " 'drop_by_id',\n", | |||
|
384 | " 'enable_gui',\n", | |||
|
385 | " 'enable_matplotlib',\n", | |||
|
386 | " 'enable_pylab',\n", | |||
|
387 | " 'ev',\n", | |||
|
388 | " 'ex',\n", | |||
|
389 | " 'excepthook',\n", | |||
|
390 | " 'execution_count',\n", | |||
|
391 | " 'exit_now',\n", | |||
|
392 | " 'exiter',\n", | |||
|
393 | " 'extension_manager',\n", | |||
|
394 | " 'extract_input_lines',\n", | |||
|
395 | " 'filename',\n", | |||
|
396 | " 'find_cell_magic',\n", | |||
|
397 | " 'find_line_magic',\n", | |||
|
398 | " 'find_magic',\n", | |||
|
399 | " 'find_user_code',\n", | |||
|
400 | " 'get_ipython',\n", | |||
|
401 | " 'get_parent',\n", | |||
|
402 | " 'getoutput',\n", | |||
|
403 | " 'has_readline',\n", | |||
|
404 | " 'history_length',\n", | |||
|
405 | " 'history_manager',\n", | |||
|
406 | " 'home_dir',\n", | |||
|
407 | " 'hooks',\n", | |||
|
408 | " 'indent_current_nsp',\n", | |||
|
409 | " 'init_alias',\n", | |||
|
410 | " 'init_builtins',\n", | |||
|
411 | " 'init_comms',\n", | |||
|
412 | " 'init_completer',\n", | |||
|
413 | " 'init_create_namespaces',\n", | |||
|
414 | " 'init_data_pub',\n", | |||
|
415 | " 'init_display_formatter',\n", | |||
|
416 | " 'init_display_pub',\n", | |||
|
417 | " 'init_displayhook',\n", | |||
|
418 | " 'init_encoding',\n", | |||
|
419 | " 'init_environment',\n", | |||
|
420 | " 'init_extension_manager',\n", | |||
|
421 | " 'init_history',\n", | |||
|
422 | " 'init_hooks',\n", | |||
|
423 | " 'init_inspector',\n", | |||
|
424 | " 'init_instance_attrs',\n", | |||
|
425 | " 'init_io',\n", | |||
|
426 | " 'init_ipython_dir',\n", | |||
|
427 | " 'init_latextool',\n", | |||
|
428 | " 'init_logger',\n", | |||
|
429 | " 'init_logstart',\n", | |||
|
430 | " 'init_magics',\n", | |||
|
431 | " 'init_payload',\n", | |||
|
432 | " 'init_pdb',\n", | |||
|
433 | " 'init_prefilter',\n", | |||
|
434 | " 'init_profile_dir',\n", | |||
|
435 | " 'init_prompts',\n", | |||
|
436 | " 'init_pushd_popd_magic',\n", | |||
|
437 | " 'init_readline',\n", | |||
|
438 | " 'init_syntax_highlighting',\n", | |||
|
439 | " 'init_sys_modules',\n", | |||
|
440 | " 'init_traceback_handlers',\n", | |||
|
441 | " 'init_user_ns',\n", | |||
|
442 | " 'init_virtualenv',\n", | |||
|
443 | " 'initialized',\n", | |||
|
444 | " 'input_splitter',\n", | |||
|
445 | " 'input_transformer_manager',\n", | |||
|
446 | " 'inspector',\n", | |||
|
447 | " 'instance',\n", | |||
|
448 | " 'ipython_dir',\n", | |||
|
449 | " 'keepkernel_on_exit',\n", | |||
|
450 | " 'kernel',\n", | |||
|
451 | " 'logappend',\n", | |||
|
452 | " 'logfile',\n", | |||
|
453 | " 'logger',\n", | |||
|
454 | " 'logstart',\n", | |||
|
455 | " 'magic',\n", | |||
|
456 | " 'magics_manager',\n", | |||
|
457 | " 'meta',\n", | |||
|
458 | " 'mktempfile',\n", | |||
|
459 | " 'more',\n", | |||
|
460 | " 'multiline_history',\n", | |||
|
461 | " 'new_main_mod',\n", | |||
|
462 | " 'ns_table',\n", | |||
|
463 | " 'object_info_string_level',\n", | |||
|
464 | " 'object_inspect',\n", | |||
|
465 | " 'on_trait_change',\n", | |||
|
466 | " 'parent',\n", | |||
|
467 | " 'parent_header',\n", | |||
|
468 | " 'payload_manager',\n", | |||
|
469 | " 'pdb',\n", | |||
|
470 | " 'pre_readline',\n", | |||
|
471 | " 'prefilter',\n", | |||
|
472 | " 'prefilter_manager',\n", | |||
|
473 | " 'prepare_user_module',\n", | |||
|
474 | " 'profile',\n", | |||
|
475 | " 'profile_dir',\n", | |||
|
476 | " 'prompt_in1',\n", | |||
|
477 | " 'prompt_in2',\n", | |||
|
478 | " 'prompt_manager',\n", | |||
|
479 | " 'prompt_out',\n", | |||
|
480 | " 'prompts_pad_left',\n", | |||
|
481 | " 'push',\n", | |||
|
482 | " 'pycolorize',\n", | |||
|
483 | " 'pylab_gui_select',\n", | |||
|
484 | " 'quiet',\n", | |||
|
485 | " 'raw_input_original',\n", | |||
|
486 | " 'readline',\n", | |||
|
487 | " 'readline_delims',\n", | |||
|
488 | " 'readline_no_record',\n", | |||
|
489 | " 'readline_parse_and_bind',\n", | |||
|
490 | " 'readline_remove_delims',\n", | |||
|
491 | " 'readline_use',\n", | |||
|
492 | " 'refill_readline_hist',\n", | |||
|
493 | " 'register_magic_function',\n", | |||
|
494 | " 'register_magics',\n", | |||
|
495 | " 'register_post_execute',\n", | |||
|
496 | " 'reset',\n", | |||
|
497 | " 'reset_selective',\n", | |||
|
498 | " 'restore_sys_module_state',\n", | |||
|
499 | " 'rl_do_indent',\n", | |||
|
500 | " 'rl_next_input',\n", | |||
|
501 | " 'run_ast_nodes',\n", | |||
|
502 | " 'run_cell',\n", | |||
|
503 | " 'run_cell_magic',\n", | |||
|
504 | " 'run_code',\n", | |||
|
505 | " 'run_line_magic',\n", | |||
|
506 | " 'runcode',\n", | |||
|
507 | " 'safe_execfile',\n", | |||
|
508 | " 'safe_execfile_ipy',\n", | |||
|
509 | " 'safe_run_module',\n", | |||
|
510 | " 'save_sys_module_state',\n", | |||
|
511 | " 'section_names',\n", | |||
|
512 | " 'separate_in',\n", | |||
|
513 | " 'separate_out',\n", | |||
|
514 | " 'separate_out2',\n", | |||
|
515 | " 'set_autoindent',\n", | |||
|
516 | " 'set_completer_frame',\n", | |||
|
517 | " 'set_custom_completer',\n", | |||
|
518 | " 'set_custom_exc',\n", | |||
|
519 | " 'set_hook',\n", | |||
|
520 | " 'set_next_input',\n", | |||
|
521 | " 'set_parent',\n", | |||
|
522 | " 'set_readline_completer',\n", | |||
|
523 | " 'show_rewritten_input',\n", | |||
|
524 | " 'show_usage',\n", | |||
|
525 | " 'show_usage_error',\n", | |||
|
526 | " 'showindentationerror',\n", | |||
|
527 | " 'showsyntaxerror',\n", | |||
|
528 | " 'showtraceback',\n", | |||
|
529 | " 'starting_dir',\n", | |||
|
530 | " 'stdin_encoding',\n", | |||
|
531 | " 'strdispatchers',\n", | |||
|
532 | " 'sys_excepthook',\n", | |||
|
533 | " 'system',\n", | |||
|
534 | " 'system_piped',\n", | |||
|
535 | " 'system_raw',\n", | |||
|
536 | " 'tempfiles',\n", | |||
|
537 | " 'trait_metadata',\n", | |||
|
538 | " 'trait_names',\n", | |||
|
539 | " 'traits',\n", | |||
|
540 | " 'transform_ast',\n", | |||
|
541 | " 'update_config',\n", | |||
|
542 | " 'user_expressions',\n", | |||
|
543 | " 'user_global_ns',\n", | |||
|
544 | " 'user_module',\n", | |||
|
545 | " 'user_ns',\n", | |||
|
546 | " 'user_ns_hidden',\n", | |||
|
547 | " 'user_variables',\n", | |||
|
548 | " 'var_expand',\n", | |||
|
549 | " 'wildcards_case_sensitive',\n", | |||
|
550 | " 'write',\n", | |||
|
551 | " 'write_err',\n", | |||
|
552 | " 'xmode']" | |||
|
553 | ] | |||
|
554 | } | |||
|
555 | ], | |||
|
556 | "prompt_number": 4 | |||
|
557 | }, | |||
|
558 | { | |||
|
559 | "cell_type": "code", | |||
|
560 | "collapsed": false, | |||
|
561 | "input": [], | |||
|
562 | "language": "python", | |||
|
563 | "metadata": {}, | |||
|
564 | "outputs": [] | |||
244 | } |
|
565 | } | |
245 | ], |
|
566 | ], | |
246 | "metadata": {} |
|
567 | "metadata": {} |
General Comments 0
You need to be logged in to leave comments.
Login now