Emacs Python错误延迟 [英] Emacs Python error delay

查看:58
本文介绍了Emacs Python错误延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上使用Python 3.3和Emacs 23.4。使用python-shell时出现一些奇怪的现象。如果键入产生某种输出的命令,我将在下一行立即获得结果。但是,如果我输入的Python语句导致错误,则不会显示任何输出。当我键入下一条Python语句并按Enter键时,将显示上一行的错误消息。

I'm using Python 3.3 and Emacs 23.4 on Windows 7. I'm getting some odd behaviour when using python-shell. If I type in a command that produces some sort of output I get the result immediately on the next line. If the Python statement I've entered causes an error however, no output is shown. When I type in the next Python statement and hit enter, the error message for the previous line will be displayed.

例如,当我在处理一些命令行参数时:

For example when I'm processing some command line arguments:

>>> args
Namespace(templatedir=None, xmldir=None)
>>> args.bobbins
>>> args.templatedir
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Namespace' object has no attribute 'bobbins'
>>> 

第一条语句打印出args变量的值。
第二条语句应打印出错误消息,但不打印任何内容。
第三条语句是正确的,但实际上会打印出第二条语句中的错误。

The first statement prints out the value of the args variable. The second statement should print out an error message but nothing is printed. The third statement is correct but actually prints out the error from the second statement.

有人知道我的Python / Emacs设置有什么问题吗?

Does anybody have any idea what's wrong with my Python / Emacs setup?

推荐答案

这是Python中的错误,已修复

This was a bug in Python, and was fixed.

这篇关于Emacs Python错误延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆