iPython in Emacs. Quick code evaluation

Posted by AmV on Stack Overflow See other posts from Stack Overflow or by AmV
Published on 2010-12-27T23:50:44Z Indexed on 2010/12/27 23:53 UTC
Read the original article Hit count: 248

Filed under:
|
|

Hi all,

I would like to "send" code snippets to a iPython interpreter in Emacs 23.2 (Linux). I have two related questions about this:

Q1: I have learned that Emacs provides ('shell-command-on-region') to run selected regions in a shell. I have set setq shell-file-name to my iPython path, but when I run M-| after selecting a region, Emacs prompts me the following:

Shell command on region:

and if I then type RET, I get the iPython man page on the *Shell Command Output* buffer, without the region being executed. Why?

Q2: Assuming that I have already started an iPython shell in some other buffer in Emacs, is there a way of selecting a region in another buffer and "sending" this region to the already-started iPython shell?

Thanks!

© Stack Overflow or respective owner

Related posts about shell

Related posts about emacs