我对python2.7中的IMAP有一个问题
出于测试目的,我创建了foobar306@gmail.com
,密码为testing123testing
我跟随this tutorial并在我的Python Iteractive Shell中键入以下内容:
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import imaplib
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('foobar306@gmail.com', 'testing123testing')
mail.list()
# Out: list of "folders" aka labels in gmail.
mail.select("inbox") # connect to inbox.
>>>
什么都没有发生,甚至错误消息也没有。 注意:我已经在Gmail中启用了IMAP 谢谢,-蒂姆
更新:针对此评论:
Did you do the next section after the code you quoted above? – Amber
我试过了:
^{pr2}$但它还是什么也没做
它似乎对我有用;我通过python API创建了一个
sarnoldwashere
文件夹:它应该仍然存在于web界面中。(除非其他人同时删除它。)
编辑包括课程的全部内容,甚至包括我重新学习Python方法的枯燥部分:
^{pr2}$相关问题 更多 >
编程相关推荐