Re: escape codes in python shell after wl loaded

George Moutsopoulos <[email protected]> Sun, 28 Jan 2018 22:07:09 +0000
Newsgroups gmane.mail.wanderlust.general
Message-ID <CABU1Ay8JHDwemJc1V98HbqS+eHA-Mb4jrCEdZgU6epitoZZCNg__17576.6747132458$1517177226$gmane$org@mail.gmail.com>
Thank you for the reply Kazuhiro.

You mention
--simple-prompt, but this solves a problem that only appears with ipython
version 5+. I am stuck with ipython version 1.1 at work, which doesn't have
that problem (http://ipython.readthedocs.io/en/stable/whatsnew/version5.
html#id1) and also my version of ipython doesn't have the --simple-prompt
flag.

I will strip down my wl-init-file to see if that helps. I checked that
emacs -Q with minimum 1) (package-initialize) 2) my current wl-init-file
and loading wl and 3) (setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i") still has problems. In fact, with this
minimal,
M-x shell gives
Process shell stopped (tty input)
only after wl
M-x run-python
gives the same garbled output
only after wl
I will try to stip down my w-init-file see if it makes a difference.

I will let you know if I make progress. There is in fact a solution I know
which is ipython --classic but then I don't have numbered prompts.

Regards and thanks.
George

On 26 January 2018 at 11:14, Kazuhiro Ito <[email protected]> wrote:

> > after loading wl and the running an "Inferior Python" shell, the python
> > [In] prompts are garbled like
> > ^A^BIn [^A^B1^A^B]: ^A^B
> > (with color)
> > instead of
> > In[1]:
>
> As far as I confirmed on Emacs 25.2.2 on Debian/sid, ipython outputs
> garbled prompt with Emacs stared with -Q options.
>
> $ emacs -Q
>
> M-x shell
> ipython
>
> ^[[6n^[[JIn [1]: ^[[8D^[[8C
>
> And document (*1) says '--simple-prompt' flag is required for Emacs.
> Have you tried it?
>
> (*1) http://ipython.readthedocs.io/en/stable/whatsnew/version5.html#id1
>
> --
> Kazuhiro Ito
>
>