Say I open a terminal emulator in Emacs with M-x ansi-term. This opens a buffer in Emacs with the shell of my choice. Say I then run ipython from this shell. Can I send code to this ipython session from another buffer with Python code in Emacs? If so how?
Say I open a terminal emulator in Emacs with M-x ansi-term . This opens
Share
I have a minor mode for this purpose (except it is not IPython-specific and I mostly use it for shell scripts): isend-mode.
Here is how you would use it:
Open an
ansi-termbuffer:M-x
ansi-termRET/usr/bin/ipythonRETOpen the buffer with the code you want to execute, and associate it to the interpreter buffer:
M-x
isend-associateRET*ansi-term*RETHit C-RET in the python buffer to send the current line to the interpreter in the
ansi-termbuffer.