【问题标题】:Emacs shell not start python interpreterEmacs shell 无法启动 python 解释器
【发布时间】:2017-02-13 11:00:41
【问题描述】:

Windows 7、Emacs 25.1、Python 2.7

  1. 启动 Windows 提示符

  2. 输入“蟒蛇”

  3. 成功进入python

  4. Emacs

  5. 启动外壳

  6. 输入“蟒蛇”

不启动python

为什么?

【问题讨论】:

  • Emacs 是文本编辑器,为什么要运行 python IDLE?
  • 我认为 Emacs 不仅仅是文本编辑器 :-)
  • 是的,但您必须配置此附加功能:stackoverflow.com/questions/10241279/…
  • 但是从 cmd 运行 python,会给你 python shell (IDLE)。您似乎想在 Emacs 中做同样的事情?您可以使用以下命令在 emacs 中运行 python 脚本:python scriptname.py,但要使用 IDLE,您需要进行一些调整。你想达到什么目标?
  • 显式外壳文件名 = 无。在 emacs shell 中,我通过以下方式启动 python 脚本:python my_script.py。好的。当我需要输入 python IDLE 时,我使用 windows 提示符。但我想在 Emacs 中做所有事情。

标签: python shell emacs


【解决方案1】:

要从 emacs 启动 python,你可以启动一个新的 python 实例 使用命令M-x run-python 解释器。根据我的经验 emacs 中的 shell 实现在功能上有所限制。 您还可以从 emacs 自己的 shell 实现中运行 python eshell.

这是有效的。它启动了一个 python 解释器,但它也向我显示了一个警告:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-11-23
    • 1970-01-01
    • 2011-08-05
    • 1970-01-01
    • 2011-10-11
    • 2023-04-07
    • 2014-12-12
    相关资源
    最近更新 更多