Show More
@@ -331,6 +331,7 b' class Kernel(Configurable):' | |||
|
331 | 331 | content = parent[u'content'] |
|
332 | 332 | code = content[u'code'] |
|
333 | 333 | silent = content[u'silent'] |
|
334 | store_history = content.get(u'store_history', not silent) | |
|
334 | 335 | except: |
|
335 | 336 | self.log.error("Got bad msg: ") |
|
336 | 337 | self.log.error("%s", parent) |
@@ -366,7 +367,7 b' class Kernel(Configurable):' | |||
|
366 | 367 | reply_content = {} |
|
367 | 368 | try: |
|
368 | 369 | # FIXME: the shell calls the exception handler itself. |
|
369 |
shell.run_cell(code, store_history= |
|
|
370 | shell.run_cell(code, store_history=store_history, silent=silent) | |
|
370 | 371 | except: |
|
371 | 372 | status = u'error' |
|
372 | 373 | # FIXME: this code right now isn't being used yet by default, |
@@ -161,11 +161,14 b' Message type: ``execute_request``::' | |||
|
161 | 161 | # sys.displayhook will not fire), and will *not*: |
|
162 | 162 | # - broadcast exceptions on the PUB socket |
|
163 | 163 | # - do any logging |
|
164 | # - populate any history | |
|
165 | 164 | # |
|
166 | 165 | # The default is False. |
|
167 | 166 | 'silent' : bool, |
|
168 | 167 | |
|
168 | # A boolean flag which, if True, signals the kernel to populate history | |
|
169 | # The default is False if silent is True, or True if silent is False. | |
|
170 | 'store_history' : bool, | |
|
171 | ||
|
169 | 172 | # A list of variable names from the user's namespace to be retrieved. What |
|
170 | 173 | # returns is a JSON string of the variable's repr(), not a python object. |
|
171 | 174 | 'user_variables' : list, |
@@ -308,7 +311,7 b' Execution counter (old prompt number)' | |||
|
308 | 311 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
309 | 312 | |
|
310 | 313 | The kernel has a single, monotonically increasing counter of all execution |
|
311 |
requests that are made with ``s |
|
|
314 | requests that are made with ``store_history=True``. This counter is used to populate | |
|
312 | 315 | the ``In[n]``, ``Out[n]`` and ``_n`` variables, so clients will likely want to |
|
313 | 316 | display it in some form to the user, which will typically (but not necessarily) |
|
314 | 317 | be done in the prompts. The value of this counter will be returned as the |
@@ -325,9 +328,9 b' Message type: ``execute_reply``::' | |||
|
325 | 328 | # One of: 'ok' OR 'error' OR 'abort' |
|
326 | 329 | 'status' : str, |
|
327 | 330 | |
|
328 |
# The global kernel counter that increases by one with each |
|
|
329 |
# |
|
|
330 |
# prompt numbers to the user. If the request |
|
|
331 | # The global kernel counter that increases by one with each request that | |
|
332 | # stores history. This will typically be used by clients to display | |
|
333 | # prompt numbers to the user. If the request did not store history, this will | |
|
331 | 334 | # be the current value of the counter in the kernel. |
|
332 | 335 | 'execution_count' : int, |
|
333 | 336 | } |
General Comments 0
You need to be logged in to leave comments.
Login now