[IPython-user] [FWD] How I run IPython inside of emacs shell?

Fernando Perez Fernando.Perez at colorado.edu
Mon Mar 8 17:35:14 CST 2004


Note: your original message had been discarded, because the ipython lists 
don't allow non-subcriber postings.  I reposted it manually (along with my 
reply at the end), but you'll need to subscribe to the list if you wish to 
post in the future.  Sorry, but the volume of spam we were getting made this 
necessary.

ipython-user-bounces at scipy.net wrote:
> The attached message has been automatically discarded.
> 
> 
> ------------------------------------------------------------------------
> 
> Subject: How I run IPython inside of emacs shell?
> From: Ir Forex <ir4u4 at yahoo.com>
> Date: Sun, 7 Mar 2004 22:42:02 -0800 (PST)
> To: ipython-user at scipy.net
> 
> 
> Hi,
> 
> I just figured out how to run python inside of emacs:
> 
> I use meta-x shell to start a shell and then once I see a shell
> prompt I enter the python command and I get a well-behaved python
> shell inside of emacs.
> 
> I'm trying to figure out the best way to run ipython inside of emacs.
> 
> When I run the ipython shell command inside of an emacs shell it
> does not act very clean (the prompt is messy looking).
> 
> So I put two files in my /usr/share/emacs/site-lisp/ dir:
> 
> python-mode.el
> ipython.el
> 
> I got both files from 
> http://ipython.scipy.org/
> 
> I'm not sure what to do next.
> 
> So far I've tried this:
> 
> -run meta-x ipython while inside of a shell buffer
> -run meta-x ipython while inside of a shell buffer which is running ipython
> -run meta-x ipython while inside of a python-mode buffer
> 
> All three of the above ideas obviously don't work.
> 
> Please post some clues.
> 
> thanks,
> 
> -moi
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you’re looking for faster
> http://search.yahoo.com
> 

Answer: note that I posted this same answer on c.l.py when I saw this earlier 
today.  I repost it here for the sake of completeness.


Try instead putting the following in your .emacs file:

(require 'ipython)

Then, start the ipython shell via C-c ! (that is, Control-C followed by an
exclamation mark), from a python buffer.  Don't do meta-x 'shell', because
it won't initialize properly the color handling.  Let me know if this works
ok. Feel free to mail me directly to fperez-AT-colorado-DOT-edu, I'm the
ipython main developer, or to the mailing lists.  If I get stuck (I'm no emacs
expert), we can ask Alex Schmolck, the original author of ipython support for
emacs.

cheers,

f




More information about the IPython-user mailing list