python - ipython 来自 Windows XP 上的 emacs,没有提示也没有打印输出

标签 python emacs ipython

我想将 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/

相关文章:

Asm 模式下的 Emacs 缩进

emacs - 如何在 org-mode 中给括号中的单词加下划线以导出到 LaTeX

python - 如何在没有多重共线性的 Pandas 中创建虚拟变量?

python - 连接到远程 IPython 实例

python - pygal 图表不在 Jupyter/IPython 笔记本中显示工具提示

python - 从字典中绘制直方图

python - 使用 Sounddevice 连续播放音频

python - 为什么 setup.py 表面上成功安装了我的包,但实际上却未能安装依赖项?

python - 创建特定大小的 Numpy 数组,然后以步进速率填充值

Python 驱动 Emacs; pymacs 不工作