我想将 ipython 集成到 Windows XP 上的 emacs 23。 我可以在网上找到很多信息,但没有任何帮助。
我的 ~/.emacs.d/init.el
中需要以下内容:
- python模式
- pymacs
- ipython
pyreadline 也已安装。
我用一个带有标志 -i 和 -u 的 bat 文件(在我的系统路径中)启动 ipython。
信息文本
c:\Program\emacs-23.2\bin>c:\program\python27\scripts\ipython -i -u
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.10.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
在我写第一个命令之前不会出现。
我没有得到任何提示。
写入和“执行”数字确实会导致红色“Out[n]:
”和数字。
Print
不提供任何内容。
a
给出彩色的 ipython 错误文本,以 NameError: name 'a' not defined
结尾。
换句话说,错误流似乎没问题,标准输出似乎没问题,但是 print
和负责打印提示的任何东西似乎都找不到正确的流。
emacs *Message*
缓冲区说:
comint-send-string: Output file descriptor of Python<1> is closed
对于 python shell 中的每个输出(未出现)。
最佳答案
确保您使用的是 pyreadline 1.6 .即使通过 Emacs 运行,1.5 版也会使用控制台 API 写入流。这会导致许多与您所看到的问题类似的问题。
关于python - ipython 来自 Windows XP 上的 emacs,没有提示也没有打印输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4468935/