2011-08-16 44 views
3

我有ipython.el并安装在我的道路上python-mode.el,和我有以下添加到我的init.el:IPython的外壳不会启动

(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模式坚持启动python解释器而不是ipython。更改py-python-command也没有帮助。

如何让Ipython成为默认?

回答

1

:) 同样的问题,当我想在emacs中使用ipython。

事实上,新的python模式提供了另一种方法来调用ipython。 你只需简单地调用该方法即可解决此问题。 (绑定功能,你需要钥匙) 可以使用命令:

M-x ipython 

使用IPython的

执行在IPython的代码通过调用:

M-x py-execute-buffer-ipython 

但是,说实话,在Emacs使用IPython的比较慢并且使用

py-execute-buffer 

python-mode可以处理几乎所有的q uestions(易于更改代码,移动光标或任何要求)。