how to fix IPython prompt in emacs shell mode?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to fix IPython prompt in emacs shell mode?

Tom Roche

When, in emacs, I do

M-x shell
ipython

everything seems to work, except that the prompt is

^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m

How to get the normal ipython prompt, or close facsimile? Or is there
a better way to run ipython interactively in an emacs buffer? FWIW,
I've got

Ubuntu 10.04.1 LTS, GNOME, 64-bit
GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
ipython 0.10 from ubuntu package
python-mode 5.1.0 from https://launchpad.net/python-mode/

TIA, Tom Roche <[hidden email]>
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: how to fix IPython prompt in emacs shell mode?

Andrew Wilson-16


On Wed, Sep 29, 2010 at 1:50 PM, Tom Roche <[hidden email]> wrote:

When, in emacs, I do

M-x shell
ipython

everything seems to work, except that the prompt is

^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m

How to get the normal ipython prompt, or close facsimile?
  

Try this:

(setq ansi-color-for-comint-mode t)





Or is there a better way to run ipython interactively in an emacs buffer? 

ipython.el is pretty good - it has the niceties of python-mode, but with ipython as the py-shell interpreter (for example, C-c C-c in a python code buffer executes that code in your ipython buffer).

I think ipython.el is distributed with ipython, but you can also grab a copy at:  http://ipython.scipy.org/dist/ipython.el

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: how to fix IPython prompt in emacs shell mode?

Tom Roche

Tom Roche Wed, Sep 29, 2010 at 1:50 PM
>> When, in emacs, I do

>> M-x shell
>> ipython

>> everything seems to work, except that the prompt is

>> ^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m

Andrew Wilson Wed, 29 Sep 2010 14:28:19 -0500
> (setq ansi-color-for-comint-mode t)

Thanks! solved that problem. I'll post separately regarding some other
issues running ipython from emacs.

your assistance is appreciated, Tom Roche <[hidden email]>
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user