Re: New IPython 5 prompt

Thomas Kluyver <[email protected]> Sun, 21 Aug 2016 17:11:30 +0100
Newsgroups gmane.comp.python.ipython.user
Message-ID <CAOvn4qiqH+yXgrnks9+j7t=SboaCtz99rERpvGdsXsW7dV3UiA@mail.gmail.com>
--===============3433578282179744353==
Content-Type: multipart/alternative; boundary=001a113f112212c440053a973192

--001a113f112212c440053a973192
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thanks Carl! FWIW, here's my startup file for custom prompts, which
produces a more compact prompt than the default, and (IMO) a nicer look for
multiline input:
https://gist.github.com/takluyver/85b33db0836cdcc4baf252fd81937fa7

On 21 August 2016 at 17:01, Carl Smith <[email protected]> wrote:

> Sorry for the noise. Just thought to share my prompt code too.
>
> It changes the prompt based on whether you're entering a magic or command=
,
> implicitly or explicitly etc. My config runs %rehashx when IPython starts
> to turn all of the OS X commands into magics (except `from` as it conflic=
ts
> with `%autocall` and `from x import y`). My prompts class has a method
> (`rehash`) for updating its list of line magics, and I have a magic named
> `%rehash` that wraps `%rehashx` and `CustomPrompts.rehash`, for when new
> commands are added to the system during an IPython session.
>
> *from IPython.core.magic import register_line_magic as line_magic*
> *from IPython.terminal.prompts import Prompts, Token*
>
> *class CustomPrompts(Prompts):*
>
> *    def __init__(self, shell):*
>
> *        self.cli =3D None*
> *        self.shell =3D shell*
> *        self.rehash()*
>
> *    def rehash(self):*
>
> *        self.commands =3D self.shell.magics_manager.magics["line"].keys(=
)*
>
> *    def input_prompt(self, cli):*
>
> *        if not cli: return "=E2=96=B9 "*
> *        text =3D cli.buffers["DEFAULT_BUFFER"].text*
> *        if text.startswith("%") or text.startswith("!"): return ": "*
> *        magic =3D "\n" not in text and text.split(" ")[0] in self.comman=
ds*
> *        return "% " if magic else "=E2=96=B9 "*
>
> *    def in_prompt_tokens(self, cli=3DNone): return [*
> *        (Token.Number, "("),*
> *        (Token.Prompt, str(self.shell.execution_count)),*
> *        (Token.Number, ")"),*
> *        (Token.Prompt, self.input_prompt(cli))*
> *        ]*
>
>     *def out_prompt_tokens(self): return [*
> *        (Token.Number, "("),*
> *        (Token.OutPrompt, str(self.shell.execution_count)),*
> *        (Token.Number, ")"),*
> *        (Token.OutPrompt, "=E2=96=B9 ")*
> *        ]*
>
> *    def continuation_prompt_tokens(self, cli=3DNone, width=3DNone):*
> *        if width is None: width =3D self._width()*
> *        return [(Token.Prompt, " " * (width - 5) + "   =E2=96=B9 ")]*
>
> *    def rewrite_prompt_tokens(self): return [*
> *        (Token.Number, ('=E2=96=B9' * (self._width() - 2))),*
> *        (Token.Number, '=E2=96=B9 ')*
> *        ]*
>
> *@line_magic*
> *def rehash(silent=3DFalse):*
>
> *    % rehashx*
> *    del ip.magics_manager.magics["line"]["from"]*
> *    ip.prompts.rehash()*
> *    if not silent: print("System magic updated.")*
>
> *ip =3D get_ipython()*
> *ip.prompts =3D CustomPrompts(ip)*
>
> *% rehash quiet*
>
> *del rehash*
>
> I know the code's a bit messy. It's just what I had, and should offer
> enough clues to figure out how to do most things.
>
> Hope it helps,
>
> -- Carl Smith
> [email protected]
>
> On 21 August 2016 at 16:36, Carl Smith <[email protected]> wrote:
>
>> I have this in my ipython_config file:
>>
>> *from pygments.token import Token*
>>
>> *c.TerminalInteractiveShell.highlighting_style =3D 'lovelace'*
>>
>> *c.TerminalInteractiveShell.highlighting_style_overrides =3D {*
>> *    Token.Prompt: '#00cccc',*
>> *    Token.PromptNum: '#00bbcc bold',*
>> *    Token.OutPrompt: '#cc00cc',*
>> *    Token.OutPromptNum: '#bb00cc bold',*
>> *    }*
>>
>> With a dark background, it looks really nice. It uses a teal/cyan colour
>> for inputs and hotpink for outputs, so if you like cyan, you might like
>> this. You can use it as a starting point at least.
>>
>> Best,
>>
>> -- Carl Smith
>> [email protected]
>>
>> On 21 August 2016 at 16:27, Carl Smith <[email protected]> wrote:
>>
>>> On 21 August 2016 at 16:05, Thomas Kluyver <[email protected]> wrote:
>>>
>>>>
>>>> We appreciate this is a bit more fiddly for simple custom prompts, but
>>>> the advantages of using prompt_toolkit outweigh it.
>>>>
>>>
>>> =E2=80=8BAgreed=E2=80=8B. It is more complex, but once you understand t=
he API, you can
>>> easily do everything you could do before, and there's some really nice =
new
>>> features and fixes. Prompt toolkit is awesome.
>>>
>>> -- Carl Smith
>>> [email protected]
>>>
>>>
>>
>
> _______________________________________________
> IPython-User mailing list
> [email protected]
> https://mail.scipy.org/mailman/listinfo/ipython-user
>
>

--001a113f112212c440053a973192
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thanks Carl! FWIW, here&#39;s my startup file for cus=
tom prompts, which produces a more compact prompt than the default, and (IM=
O) a nicer look for multiline input:<br><a href=3D"https://gist.github.com/=
takluyver/85b33db0836cdcc4baf252fd81937fa7">https://gist.github.com/takluyv=
er/85b33db0836cdcc4baf252fd81937fa7</a><br></div></div><div class=3D"gmail_=
extra"><br><div class=3D"gmail_quote">On 21 August 2016 at 17:01, Carl Smit=
h <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family=
:monospace,monospace;font-size:small;color:rgb(68,68,68)">Sorry for the noi=
se. Just thought to share my prompt code too.</div><div class=3D"gmail_defa=
ult" style=3D"font-family:monospace,monospace;font-size:small;color:rgb(68,=
68,68)"><br></div><div class=3D"gmail_default" style=3D"font-family:monospa=
ce,monospace;font-size:small;color:rgb(68,68,68)">It changes the prompt bas=
ed on whether you&#39;re entering a magic or command, implicitly or explici=
tly etc. My config runs %rehashx when IPython starts to turn all of the OS =
X commands into magics (except `from` as it conflicts with `%autocall` and =
`from x import y`). My prompts class has a method (`rehash`) for updating i=
ts list of line magics, and I have a magic named `%rehash` that wraps `%reh=
ashx` and `CustomPrompts.rehash`, for when new commands are added to the sy=
stem during an IPython session.</div><div class=3D"gmail_default" style=3D"=
font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></=
div><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=
=3D"#444444"><b>from IPython.core.magic import register_line_magic as line_=
magic</b></font><br></div><div class=3D"gmail_default"><span class=3D""><di=
v class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444=
444"><b>from IPython.terminal.prompts import Prompts, Token</b></font></div=
><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"=
#444444"><b><br></b></font></div><div class=3D"gmail_default"><font face=3D=
"monospace, monospace" color=3D"#444444"><b>class CustomPrompts(Prompts):</=
b></font></div><div class=3D"gmail_default"><font face=3D"monospace, monosp=
ace" color=3D"#444444"><b><br></b></font></div></span><div class=3D"gmail_d=
efault"><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=
=A0 def __init__(self, shell):</b></font></div><div class=3D"gmail_default"=
><font face=3D"monospace, monospace" color=3D"#444444"><b><br></b></font></=
div><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=
=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.cli =3D None</b></font></d=
iv><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=
=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.shell =3D shell</b></font>=
</div><div class=3D"gmail_default"><font face=3D"monospace, monospace" colo=
r=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.rehash()</b></font></div>=
<div class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#=
444444"><b><br></b></font></div><div class=3D"gmail_default"><font face=3D"=
monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 def rehash(self):<=
/b></font></div><div class=3D"gmail_default"><font face=3D"monospace, monos=
pace" color=3D"#444444"><b><br></b></font></div><div class=3D"gmail_default=
"><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 self.commands =3D self.shell.magics_manager.<wbr>magics[&quot=
;line&quot;].keys()</b></font></div><div class=3D"gmail_default"><font face=
=3D"monospace, monospace" color=3D"#444444"><b><br></b></font></div><div cl=
ass=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"=
><b>=C2=A0 =C2=A0 def input_prompt(self, cli):</b></font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"><b=
><br></b></font></div><div class=3D"gmail_default"><font face=3D"monospace,=
 monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if not cli: re=
turn &quot;=E2=96=B9 &quot;</b></font></div><div class=3D"gmail_default"><f=
ont face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 text =3D cli.buffers[&quot;DEFAULT_BUFFER&quot;].<wbr>text</b></fon=
t></div><div class=3D"gmail_default"><font face=3D"monospace, monospace" co=
lor=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if text.startswith(&quot;%&q=
uot;) or text.startswith(&quot;!&quot;): return &quot;: &quot;</b></font></=
div><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=
=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 magic =3D &quot;\n&quot; not in=
 text and text.split(&quot; &quot;)[0] in self.commands</b></font></div><di=
v class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444=
444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return &quot;% &quot; if magic else &qu=
ot;=E2=96=B9 &quot;</b></font></div><div class=3D"gmail_default"><font face=
=3D"monospace, monospace" color=3D"#444444"><b><br></b></font></div><div cl=
ass=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"=
><b>=C2=A0 =C2=A0 def in_prompt_tokens(self, cli=3DNone): return [</b></fon=
t></div><div class=3D"gmail_default"><font face=3D"monospace, monospace" co=
lor=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Number, &quot;(&quot;=
),</b></font></div><div class=3D"gmail_default"><font face=3D"monospace, mo=
nospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Prompt, st=
r(self.shell.execution_<wbr>count)),</b></font></div><div class=3D"gmail_de=
fault"><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 (Token.Number, &quot;)&quot;),</b></font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"><b=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Prompt, self.input_prompt(cli))</b></fo=
nt></div><div class=3D"gmail_default"><font face=3D"monospace, monospace" c=
olor=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ]</b></font></div><div clas=
s=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"><=
br></font></div><div class=3D"gmail_default"><font face=3D"monospace, monos=
pace" color=3D"#444444">=C2=A0 =C2=A0 <b>def out_prompt_tokens(self): retur=
n [</b></font></div><div class=3D"gmail_default"><font face=3D"monospace, m=
onospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Number, &=
quot;(&quot;),</b></font></div><div class=3D"gmail_default"><font face=3D"m=
onospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Toke=
n.OutPrompt, str(self.shell.execution_<wbr>count)),</b></font></div><div cl=
ass=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"=
><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Number, &quot;)&quot;),</b></font></=
div><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=
=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.OutPrompt, &quot;=E2=96=
=B9 &quot;)</b></font></div><div class=3D"gmail_default"><font face=3D"mono=
space, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ]</b></f=
ont></div><div class=3D"gmail_default"><font face=3D"monospace, monospace" =
color=3D"#444444"><b><br></b></font></div><div class=3D"gmail_default"><fon=
t face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 def cont=
inuation_prompt_tokens(<wbr>self, cli=3DNone, width=3DNone):</b></font></di=
v><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D=
"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if width is None: width =3D self._=
width()</b></font></div><div class=3D"gmail_default"><font face=3D"monospac=
e, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return [(Tok=
en.Prompt, &quot; &quot; * (width - 5) + &quot; =C2=A0 =E2=96=B9 &quot;)]</=
b></font></div><div class=3D"gmail_default"><font face=3D"monospace, monosp=
ace" color=3D"#444444"><b><br></b></font></div><div class=3D"gmail_default"=
><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 def=
 rewrite_prompt_tokens(self): return [</b></font></div><div class=3D"gmail_=
default"><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 (Token.Number, (&#39;=E2=96=B9&#39; * (self._width() -=
 2))),</b></font></div><div class=3D"gmail_default"><font face=3D"monospace=
, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (Token.Number=
, &#39;=E2=96=B9 &#39;)</b></font></div><div class=3D"gmail_default"><font =
face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 ]</b></font></div></div><div class=3D"gmail_default" style=3D"font-fami=
ly:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div =
class=3D"gmail_default"><div class=3D"gmail_default"><font face=3D"monospac=
e, monospace" color=3D"#444444"><b>@line_magic</b></font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"#444444"><b=
>def rehash(silent=3DFalse):</b></font></div><div class=3D"gmail_default"><=
font face=3D"monospace, monospace" color=3D"#444444"><b><br></b></font></di=
v><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D=
"#444444"><b>=C2=A0 =C2=A0 % rehashx</b></font></div><div class=3D"gmail_de=
fault"><font face=3D"monospace, monospace" color=3D"#444444"><b>=C2=A0 =C2=
=A0 del ip.magics_manager.magics[&quot;<wbr>line&quot;][&quot;from&quot;]</=
b></font></div><div class=3D"gmail_default"><font face=3D"monospace, monosp=
ace" color=3D"#444444"><b>=C2=A0 =C2=A0 ip.prompts.rehash()</b></font></div=
><div class=3D"gmail_default"><font face=3D"monospace, monospace" color=3D"=
#444444"><b>=C2=A0 =C2=A0 if not silent: print(&quot;System magic updated.&=
quot;)</b></font></div><div style=3D"color:rgb(68,68,68);font-family:monosp=
ace,monospace;font-size:small"><b><br></b></div><div><div style=3D"color:rg=
b(68,68,68);font-family:monospace,monospace;font-size:small"><b>ip =3D get_=
ipython()</b></div><div style=3D"color:rgb(68,68,68);font-family:monospace,=
monospace;font-size:small"><b>ip.prompts =3D CustomPrompts(ip)</b></div><di=
v style=3D"color:rgb(68,68,68);font-family:monospace,monospace;font-size:sm=
all"><b><br></b></div><div><font face=3D"monospace, monospace" color=3D"#44=
4444"><b>% rehash quiet</b></font><br></div><div><font face=3D"monospace, m=
onospace" color=3D"#444444"><b>del rehash<br></b></font></div></div></div><=
div class=3D"gmail_default" style=3D"font-family:monospace,monospace;font-s=
ize:small;color:rgb(68,68,68)"><br></div><div class=3D"gmail_default" style=
=3D"font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">I =
know the code&#39;s a bit messy. It&#39;s just what I had, and should offer=
 enough clues to figure out how to do most things.</div><div class=3D"gmail=
_default" style=3D"font-family:monospace,monospace;font-size:small;color:rg=
b(68,68,68)"><br></div><div class=3D"gmail_default" style=3D"font-family:mo=
nospace,monospace;font-size:small;color:rgb(68,68,68)">Hope it helps,</div>=
</div><div class=3D"gmail_extra"><br clear=3D"all"><div><div data-smartmail=
=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=
=3D"ltr"><span style=3D"color:rgb(115,115,115);font-style:italic;line-heigh=
t:18px"><font face=3D"monospace, monospace" size=3D"1">-- Carl Smith</font>=
</span><br></div></div><div><span style=3D"color:rgb(115,115,115);font-styl=
e:italic;line-height:18px"><font face=3D"monospace, monospace" size=3D"1"><=
a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
om</a></font></span></div></div></div></div></div></div><div><div class=3D"=
h5">
<br><div class=3D"gmail_quote">On 21 August 2016 at 16:36, Carl Smith <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monosp=
ace,monospace;font-size:small;color:rgb(68,68,68)">I have this in my ipytho=
n_config file:</div><div class=3D"gmail_default" style=3D"font-family:monos=
pace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class=3D=
"gmail_default"><div class=3D"gmail_default" style=3D"color:rgb(68,68,68);f=
ont-family:monospace,monospace;font-size:small"><b>from pygments.token impo=
rt Token</b></div><div class=3D"gmail_default" style=3D"color:rgb(68,68,68)=
;font-family:monospace,monospace;font-size:small"><b><br></b></div><div><di=
v><font face=3D"monospace, monospace" color=3D"#444444"><b>c.TerminalIntera=
ctiveShell.hig<wbr>hlighting_style =3D &#39;lovelace&#39;</b></font></div><=
/div><div style=3D"color:rgb(68,68,68);font-family:monospace,monospace;font=
-size:small"><div><b><br></b></div><div><b>c.TerminalInteractiveShell.hig<w=
br>hlighting_style_overrides =3D {</b></div><div><b>=C2=A0 =C2=A0 Token.Pro=
mpt: &#39;#00cccc&#39;,</b></div><div><b>=C2=A0 =C2=A0 Token.PromptNum: &#3=
9;#00bbcc bold&#39;,</b></div><div><b>=C2=A0 =C2=A0 Token.OutPrompt: &#39;#=
cc00cc&#39;,</b></div><div><b>=C2=A0 =C2=A0 Token.OutPromptNum: &#39;#bb00c=
c bold&#39;,</b></div><div><b>=C2=A0 =C2=A0 }</b></div><div><br></div><div>=
With a dark background, it looks really nice. It uses a teal/cyan colour fo=
r inputs and hotpink for outputs, so if you like cyan, you might like this.=
 You can use it as a starting point at least.</div><div><br></div><div>Best=
,</div></div></div></div><div class=3D"gmail_extra"><br clear=3D"all"><div>=
<div data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"l=
tr"><div><div dir=3D"ltr"><span style=3D"color:rgb(115,115,115);font-style:=
italic;line-height:18px"><font face=3D"monospace, monospace" size=3D"1">-- =
Carl Smith</font></span><br></div></div><div><span style=3D"color:rgb(115,1=
15,115);font-style:italic;line-height:18px"><font face=3D"monospace, monosp=
ace" size=3D"1"><a href=3D"mailto:[email protected]" target=3D"_blank">c=
[email protected]</a></font></span></div></div></div></div></div></div><d=
iv><div>
<br><div class=3D"gmail_quote">On 21 August 2016 at 16:27, Carl Smith <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><span><div class=3D"gmail_default" style=3D"font-family:=
monospace,monospace;font-size:small;color:rgb(68,68,68)"><span style=3D"fon=
t-family:arial,sans-serif;color:rgb(34,34,34)">On 21 August 2016 at 16:05, =
Thomas Kluyver </span><span dir=3D"ltr" style=3D"font-family:arial,sans-ser=
if;color:rgb(34,34,34)">&lt;<a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a>&gt;</span><span style=3D"font-family:arial,sans=
-serif;color:rgb(34,34,34)"> wrote:</span><br></div></span><div class=3D"gm=
ail_extra"><div class=3D"gmail_quote"><span><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"ltr"><span><div class=3D"gmail_extra"><div c=
lass=3D"gmail_quote"><br></div></div></span><div class=3D"gmail_extra">We a=
ppreciate this is a bit more fiddly for simple custom prompts, but the adva=
ntages of using prompt_toolkit outweigh it.</div></div></blockquote><div><b=
r></div></span><div><div class=3D"gmail_default" style=3D"font-family:monos=
pace,monospace;font-size:small;color:rgb(68,68,68)">=E2=80=8BAgreed=E2=80=
=8B. It is more complex, but once you understand the API, you can easily do=
 everything you could do before, and there&#39;s some really nice new featu=
res and fixes. Prompt toolkit is awesome.</div></div><span><font color=3D"#=
888888"><div class=3D"gmail_default" style=3D"font-family:monospace,monospa=
ce;font-size:small;color:rgb(68,68,68)"><br></div><div><div><div data-smart=
mail=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"ltr"><div><div dir=3D=
"ltr"><span style=3D"color:rgb(115,115,115);font-style:italic;line-height:1=
8px"><font face=3D"monospace, monospace" size=3D"1">-- Carl Smith</font></s=
pan><br></div></div><div><span style=3D"color:rgb(115,115,115);font-style:i=
talic;line-height:18px"><font face=3D"monospace, monospace" size=3D"1"><a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]<=
/a></font></span></div><div><span style=3D"color:rgb(115,115,115);font-styl=
e:italic;line-height:18px"><br></span></div></div></div></div></div></div><=
/font></span></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
IPython-User mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><br>
<a href=3D"https://mail.scipy.org/mailman/listinfo/ipython-user" rel=3D"nor=
eferrer" target=3D"_blank">https://mail.scipy.org/<wbr>mailman/listinfo/ipy=
thon-user</a><br>
<br></blockquote></div><br></div>

--001a113f112212c440053a973192--

--===============3433578282179744353==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
IPython-User mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-user

--===============3433578282179744353==--