在某些情况下,Eclipse pydev自动建议不起作用 [英] Eclipse pydev auto-suggestions don't work in some cases
问题描述
我的问题可能是愚蠢的,我希望有人成功地解决了这个问题。
有时我看不到自动完成框中的正确建议(Eclipse 3.5.2 ,PyDev 1.5.7)。例如:
导入电子邮件
fp = open('my.eml','rb')
msg = email.message_from_file(fp)
msg
现在是一个Message对象。而像get_payload()这样的函数可以正常工作。
msg.get_payload()
/ pre>
但是在自动完成列表中我没有获得
get_payload()
。
我认为PyDev不知道什么是
msg
,所以不知道该显示什么。
也许我应该导入其他东西,不仅仅是
电子邮件
模块?
谢谢提前!
解决方案可能的是,目前的PyDev构建还没有达到能够从功能中提取的一点(
message_from_file()
在您的情况下),以了解为了提供自动完成提示返回什么样的对象。
请参阅 http://sourceforge.net/projects/pydev/论坛/论坛/ 293649 / topic / 3697707 。
编辑:我相信对PyDev有兴趣支持新的Python 3功能语法,
PEP 3107
,这将解决您将来遇到的一些问题。My question is probably stupid and I hope somebody has succeeded in solving this issue.
Sometimes I cannot see right suggestions in auto-completion box (Eclipse 3.5.2, PyDev 1.5.7). For example:
import email fp = open('my.eml', 'rb') msg = email.message_from_file(fp)
msg
now is a Message object. And functions like get_payload() works fine.msg.get_payload()
But I don't get
get_payload()
in auto-completion list.I think PyDev has no idea of what
msg
is, so it doesn't know what to show.Maybe I should import something else, not only
Thanks in advance!
解决方案Chances are, the current PyDev build hasn't gone to a point to be able to extract from a function (
message_from_file()
in your case) to know what kind of object it returns in order to provide auto-completion hinting.See http://sourceforge.net/projects/pydev/forums/forum/293649/topic/3697707.
Edit: I believe there is interest in PyDev to support the new Python 3 function syntax,
PEP 3107
, which will solve some of your problems ... in the future.这篇关于在某些情况下,Eclipse pydev自动建议不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!