我在path中安装了ipython.el和python-mode.el,并在我的init.el中添加了以下内容:
(autoload 'python-mode "python-mode" "Python editing mode." t)
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist))
(setq ipython-command "/Library/Frameworks/EPD64.framework/Versions/Current/bin/ipython")
(require 'ipython)但是python-mode坚持启动python解释器而不是ipython。更改py-python-command也无济于事。
如何将Ipython设置为默认值?
发布于 2012-05-05 15:32:11
:)当我想在emacs中使用ipython时,同样的问题。
实际上,新python模式提供了另一种调用ipython的方法。您只需调用该方法即可解决此问题。(将函数绑定到您需要的键)您可以使用命令:
M-x ipython使用ipython
调用以下命令在ipython中执行代码:
M-x py-execute-buffer-ipython但是,老实说,在emacs中使用ipython比较慢,而且使用
py-execute-buffer 在python-mode中可以处理几乎所有的问题(易于更改代码、移动光标或任何要求)。
https://stackoverflow.com/questions/7073515
复制相似问题