Re: [IPython 5] [Docs] Custom Terminal Prompts
Carl Smith <[email protected]> Mon, 11 Jul 2016 20:12:19 +0000
| Newsgroups | gmane.comp.python.ipython.devel |
|---|---|
| Message-ID | <CAP-uhDeCWF9uqzN8bzSHqwWhcv-JMnVysFH7NogwD3sdehhNJw@mail.gmail.com> |
I think the problem stems from what Thomas said: There's one shell executing code, and another just sat around doing nothing. It's the later one that the CustomPrompt class has a reference to. On the PR, should I put the example code right there in the docs, where the API is explained, or is there a wiki or something? Happy either way. Just unsure what's correct these days. Cheers, On Mon, 11 Jul 2016 13:01 Thomas Kluyver, <[email protected]> wrote: > On 11 July 2016 at 02:27, Carl Smith <[email protected]> wrote: > >> get_ipython().prompts = CustomPrompts(Shell()) >> > > Don't instantiate a new shell - the value you get from get_ipython() is > the active shell. So do this: > > ip = get_ipython() > ip.prompts = CustomPrompts(ip) > _______________________________________________ > IPython-dev mailing list > [email protected] > https://mail.scipy.org/mailman/listinfo/ipython-dev > _______________________________________________ IPython-dev mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-dev