Skip to content

Commit

Permalink
Make ast_node_interactivity trait an Enum instead of Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhansen committed May 28, 2012
1 parent e369577 commit f277c8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions IPython/core/interactiveshell.py
Expand Up @@ -368,10 +368,11 @@ def _prompt_trait_changed(self, name, old, new):
'"\C-u": unix-line-discard',
], allow_none=False, config=True)

ast_node_interactivity = Unicode('last_expr', config=True, help="""
ast_node_interactivity = Enum(['all', 'last', 'last_expr', 'none'],
default_value='last_expr', config=True,
help="""
'all', 'last', 'last_expr' or 'none'," specifying which nodes should be
run interactively (displaying output from expressions).
""")
run interactively (displaying output from expressions).""")

# TODO: this part of prompt management should be moved to the frontends.
# Use custom TraitTypes that convert '0'->'' and '\\n'->'\n'
Expand Down

0 comments on commit f277c8b

Please sign in to comment.