如何在emacs中打开IPython解释器? [英] How to open IPython interpreter in emacs?
问题描述
ipython
。这似乎不是正确的方法。 有一件事,我的缓冲区将这个缓冲区列为 * ansi-term * / code>,这是令人困惑的,因为我经常结束多个终端,其中之一是致力于Python。我也看到,我可以直接用
M-x python-shell
打开一个python解释器。对于IPython来说似乎应该有一个类似的选项。
有没有更好的方式在Emacs中使用IPython解释器?
我正在使用Emacs 24和Prelude。
我不知道前奏是什么,但是如果您可以安装最新的Emacs(即包含Fabian的蟒蛇模式的Emacs),那么您可以使用以下命令让Python模式知道您首选的解释器。那么你只需要调用 Mx run-python
。
(可执行文件ipython)
(setq python-shell-interpreteripython)
In order to use IPython during Python development in Emacs, I have been opening up a terminal, and typing ipython
. This doesn't seem like the right way to do it.
For one thing, my buffer lists this buffer as *ansi-term*
, which is confusing, as I often end up with multiple terminals, one of which is dedicated to Python. I also see that I can open a python interpreter directly with M-x python-shell
. It seems like there ought to be a similar option for IPython.
Is there a better way to use the IPython interpreter in Emacs?
I'm using Emacs 24 with Prelude.
I don't know what Prelude is, but if you can install the latest Emacs (i.e, Emacs with Fabian's python-mode included), then you can use the following to let Python mode know your preferred choice of interpreter. Then you just need to call M-x run-python
.
(when (executable-find "ipython")
(setq python-shell-interpreter "ipython")
这篇关于如何在emacs中打开IPython解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!