Support multiline input in --simple-prompt - #10606
Conversation
|
Actually, ideally I would take the prompt_text and prompt_continuation from the underlying application config - if I change them to |
This fixes the Cantor Sage backend
|
Some help fixing the tests would be appreciated, but at least my own cantor-sage-backend works now with this patch applied to IPython (plus a corresponding patch in sagemath to force |
|
Have you tried to use rlipython ? This allow IPython to reuse readline as a frontend, and should and you will not need to wait for a new release of IPython. |
|
So it seem you miss-committed, as the only missing thing was an import of cast_unicode_py2. Which is unnecessary as IPython 6 is Python 3 only, but that will make backport easier. |
|
Oh right, thanks! Yes I had been testing this against 5.1.0 from Debian, and didn't notice the import had been removed from git master. I'll let the Sage developers know about rlipython. It would be good to have this patch in IPython as well though, so that multiline input works even if not using rlipython. And it's easier for me to backport stuff to Debian after it's been accepted upstream, rather than waiting for Sage to add a new feature. |
|
ok, let's get that one in and backport. |
|
@meeseeksdev backport |
|
Oops, something went wrong applying the patch... Please have a look at my logs. |
Merge pull request ipython#10606 from infinity0/master Support multiline input in --simple-prompt
Backport PR #10606 on branch 5.x
|
Hm, unfortunately this breaks a lot of doctests in Sage. I'll investigate and try to fix... |
|
That is because sage expects the prompt to be "In [0]" but I changed it with this commit... should be quite simple to fix. |
|
OK, confirmed I can un-break the Sage doctests with a 1-line fix, there is no need to further patch IPython. |
fixes: #9816