[IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts

Fernando Perez fperez.net at gmail.com
Wed Jul 13 14:45:07 EDT 2016


On Wed, Jul 13, 2016 at 3:38 AM, Thomas Kluyver <takowl at gmail.com> wrote:

> Yes, I think the prompt is conceptually a single line. Does the
> information in the lines above where you type need to change while you're
> typing? If not, I'd recommend printing it before the prompt is displayed
> with the post_run_cell event (
> http://ipython.readthedocs.io/en/stable/config/callbacks.html).
>

Mmh, should we update the rewrite logic to basically work only on the last
line of the prompt? It could compute the length to write on prompt_string.
split('\n')[-1] rather than the full prompt_string. It seems to me that
would give us the correct logic in all cases (including single line
prompts), no?

-- 
Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20160713/c51ea215/attachment.html>


More information about the IPython-dev mailing list