【问题标题】:Ipython shell won't startIpython shell 无法启动
【发布时间】:2011-08-16 04:01:13
【问题描述】:

我的路径中安装了 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 成为默认值?

【问题讨论】:

    标签: emacs ipython


    【解决方案1】:

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

    事实上,新的python-mode 提供了另一种调用ipython 的方法。 您只需调用该方法即可解决此问题。 (将功能绑定到您需要的键) 您可以使用命令:

    M-x ipython
    

    使用 ipython

    通过调用在 ipython 中执行代码:

    M-x py-execute-buffer-ipython
    

    但是,老实说,在 emacs 中使用 ipython 比较慢,而且使用

    py-execute-buffer 
    

    在python模式下几乎可以处理所有问题(易于更改代码、移动光标或任何要求)。

    【讨论】:

      猜你喜欢
      • 2015-01-28
      • 2014-09-14
      • 1970-01-01
      • 2017-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 2013-10-23
      相关资源
      最近更新 更多