Ximin Luo:
> Ximin Luo:
>> Antonio Rojas:
>>> El lunes, 22 de mayo de 2017 23:59:00 (CEST) Ximin Luo escribió:
>>>  
>>>> Thanks for the info. I had a play around, unfortunately --simple-prompt 
>>>> won't be sufficient.
>>>>>
>>>> REPLs generally support multiline input (e.g. Python itself) so unless the 
>>>> GSoC student specifically wants Cantor+Sage to work, we'll have to try to 
>>>> figure out how to push ipython to fix their simple-prompt...
>>>>
>>>
>>> Thanks, I've added this info to the upstream report 
>>> https://bugs.kde.org/show_bug.cgi?id=375467
>>>
>>
>> I think I've managed to fix it in IPython with this patch (2 commits):
>>
>> https://github.com/ipython/ipython/pull/10606
>>
>> Can you confirm? You also need to patch sage/repl/configuration.py as I 
>> mentioned earlier, as well as patch cantor_sagebackend.so if its version is 
>> < 16.12.
>>
> 
> Unfortunately this broke some Sage doctests.
> 
> To get Cantor to detect Sage properly, I modified IPython's simple-prompt to 
> not use "In [x]" as the prompt, but to use whatever was configured by the 
> application (i.e. Sage).
> 
> However, Sage's own doctests assume that IPython would output "In [x]" in 
> simple-prompt mode. I'm having trouble finding the place in the code where it 
> does this however, any tips? I confirm that if I patch IPython to hard-code 
> "In [x]" as the prompt again (whilst also *not* reverting the multi-line fix) 
> then the sage doctests work again.
> 

Fixed: https://trac.sagemath.org/ticket/23125

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git

Reply via email to