请教:
刚开始学习Python,在看Python的库rfc822时,按照示例实作:
import rfc822
file = open("./xxx.eml")
message = rfc822.Message(file)
for k, v in message.items():
print k, "=", v
以上代码在Python命令行接口下,一切OK。但是在eric4,uplipa下运行,均提示属性错误:
"'module' object has no attribute 'Message'"
这是为什么? 谢谢!