Emacs中的Python Interpreter重复行 [英] Python Interpreter in Emacs repeats lines
问题描述
发生了什么:
>>> 2 * 10
2 * 10
20
>>>
我想要发生什么:
>>> 2 * 10
20
>>>有没有人知道为什么命令在执行之前打印出来,以及如何阻止它的执行?我找不到任何有关这方面的文件。我在Mac OS X上使用Emacs 23与Python 2.7。 解决方案我不使用python,但我猜猜你使用的python功能已经设置了变量 comint-process-echoes
不正确。无论缓冲区中的值如何,只需反转布尔值。
Comint是Emacs中用于在Emacs中运行较差进程的支持库。它与提示进行交互,需要告知python shell(或Mx shell)的回声功能。
在您的shell缓冲区中,请执行以下操作: / p>
M-:(setq comint-process-echoes t);;或nil
What is happening:
>>> 2 * 10
2 * 10
20
>>>
What I want to happen:
>>> 2 * 10
20
>>>
Does anyone know why the command is printed out before being executed and how to stop it from doing that? I can't find any documentation about this. I'm using Emacs 23 on Mac OS X with Python 2.7.
解决方案 I don't use python, but I would guess that the python feature you are using has set the variable comint-process-echoes
incorrectly. Whatever the value in your buffer is, just reverse the boolean value.
Comint is a support library in Emacs for running inferior processes in Emacs. It interacts with the prompts, and the python shell (or M-x shell) needs to be told about the echo feature.
In your shell buffer with the problem, do:
M-: (setq comint-process-echoes t) ;; or nil
这篇关于Emacs中的Python Interpreter重复行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!