I just installed Fedora 24 with Emacs and IPython. When I launched the IPython shell in Emacs, the prompt symbol, which should be "In [1]", is displayed as "^[[?12l^[[?25h". Is there a way to solve this issue?
Asked
Active
Viewed 1,903 times
6
-
5possible duplicate: http://emacs.stackexchange.com/questions/24453/weird-shell-output-when-using-ipython-5?newreg=7e15e274404d40d3bf722e1e310ee278 – Sergei Nikiforov Jul 14 '16 at 08:51
-
Which version of IPython are you using? If 5, then yes, it's most likely the same problem. – cjauvin Jul 16 '16 at 15:23
-
Thank you both! I guess I will use Python shell rather than IPython in my Emacs, but I will still use IPython in the Jupyter Notebook. Hope either Emacs or IPython will fix this compatibility issue. – htcai Jul 17 '16 at 19:33
1 Answers
0
Thank you for the this post. It took me to an answer which I needed to modify.
Error I got was similar garbled (wierd) text when I opened IPYTHON with C-c C-p
on my simple python file print("hello World")
.
ppppprrrrriiiiinnnnnttttt((((("""""HHHHHeeeeellllllllllooooo
WWWWWooooorrrrrlllllddddd""""")))))))))))))))
Hello World
Solution verbatim as per @ricardoLima's answer didn't work for me. I had to re-write it as follows.
(setq python-shell-interpreter "/path/to/bin/ipython")
(setq python-shell-interpreter-args "--simple-prompt -i")
TIP:
Just use emacs -q
in the terminal to open a no-init emacs and run these commands with M-:
. M-x run-python
and you are good to go.
P.S.
Emacs: "This is GNU Emacs 25.3.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2019-12-24"
Ubuntu: 16.04
python and Ipython from Anaconda
Python: 3.7.6
IPython: 7.12.0

Pandian Le
- 260
- 3
- 13