Add flag for simple_prompt.#9506
Conversation
|
@tacaswell would this flag name suits you ? @takluyver Should we also check for |
|
I like |
| from .pt_inputhooks import get_inputhook_func | ||
| from .interactiveshell import get_default_editor, TerminalMagics | ||
|
|
||
| _use_simple_prompt = 'IPY_TEST_SIMPLE_PROMPT' in os.environ or not sys.stdin.isatty() |
There was a problem hiding this comment.
I think these should probably override config, rather than providing the default value.
There was a problem hiding this comment.
I think the command line flag should take precedence of the env variable, especially since it has the --no-simple-prompt alternative. IIRC that's how most of our commands works.
I'm fine changing if you still think it should be.
|
As #9487 was merged, we also need to make this switch affect the debugger. It can probably just change |
As this mode seem to be useful beyond testing, expose it via a flag and make it official.
Yes.
Unsure what you mean exactly, I'm confused by the english construct, but gave it a try: + @observe('simple_prompt')
+ def _simple_prompt_changed(self, changes):
+ if changes['new'] == True:
+ self.debugger_cls = Pdb
+ else:
+ self.debugger_cls = TerminalPdb |
|
That's basically what I meant, but I'd just change |
|
Since you won't be awake for several hours, I'm going to change it locally and merge. |
|
I realised that |
As this mode seem to be useful beyond testing, expose it via a flag and
make it official.