##// END OF EJS Templates
Merge pull request #1771 from mwhansen/configurable-interactivity...
Fernando Perez -
r7063:ca7a4ec5 merge
parent child Browse files
Show More
@@ -368,6 +368,12 b' class InteractiveShell(SingletonConfigurable):'
368 368 '"\C-u": unix-line-discard',
369 369 ], allow_none=False, config=True)
370 370
371 ast_node_interactivity = Enum(['all', 'last', 'last_expr', 'none'],
372 default_value='last_expr', config=True,
373 help="""
374 'all', 'last', 'last_expr' or 'none'," specifying which nodes should be
375 run interactively (displaying output from expressions).""")
376
371 377 # TODO: this part of prompt management should be moved to the frontends.
372 378 # Use custom TraitTypes that convert '0'->'' and '\\n'->'\n'
373 379 separate_in = SeparateUnicode('\n', config=True)
@@ -2576,7 +2582,7 b' class InteractiveShell(SingletonConfigurable):'
2576 2582 self.execution_count += 1
2577 2583 return None
2578 2584
2579 interactivity = "none" if silent else "last_expr"
2585 interactivity = "none" if silent else self.ast_node_interactivity
2580 2586 self.run_ast_nodes(code_ast.body, cell_name,
2581 2587 interactivity=interactivity)
2582 2588
@@ -21,3 +21,7 b' Other new features'
21 21 migrating to this variable is not worth the aesthetic improvement. Please use
22 22 the historical :envvar:`IPYTHONDIR` environment variable instead.
23 23
24 * The default value of *interactivity* passed from
25 :meth:`~IPython.core.interactiveshell.InteractiveShell.run_cell` to
26 :meth:`~IPython.core.interactiveshell.InteractiveShell.run_ast_nodes`
27 is now configurable.
General Comments 0
You need to be logged in to leave comments. Login now