<p dir="ltr">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.</p>
<p dir="ltr">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. </p>
<p dir="ltr">Cheers, </p>
<br><div class="gmail_quote"><div dir="ltr">On Mon, 11 Jul 2016 13:01 Thomas Kluyver, <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 July 2016 at 02:27, Carl Smith <span dir="ltr"><<a href="mailto:carl.input@gmail.com" target="_blank">carl.input@gmail.com</a>></span> wrote:<br></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_default"><font color="#444444" face="monospace, monospace">get_ipython().prompts = CustomPrompts(Shell())</font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"></font></div></blockquote></div><br></div><div class="gmail_extra">Don't instantiate a new shell - the value you get from get_ipython() is the active shell. So do this:<br><br></div><div class="gmail_extra">ip = get_ipython()<br></div><div class="gmail_extra">ip.prompts = CustomPrompts(ip)<br></div></div>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/ipython-dev" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div>