by charlierguo on 8/6/13, 8:44 PM with 29 comments
by spindritf on 8/6/13, 10:10 PM
import keyring
pass_is = keyring.get_password('gmail', 'whatever@gmail.com')
you set it with set_password(servicename, username, password)
so set_password('gmail', 'whatever@gmail.com', 'one of those per app passwords if you use 2factor for example')
[1] https://pypi.python.org/pypi/keyringby mcrittenden on 8/6/13, 11:31 PM
For the record, if you just need to do some simple scripting of your Gmail, maybe on cron, Google Apps Script is great for that. https://developers.google.com/apps-script/
Here's a recent simple example I wrote up. http://mikecr.it/ramblings/marking-gmail-read-with-apps-scri...
by kbar13 on 8/6/13, 10:37 PM
If you're looking for non-gmail-specific email lib thingerator, check out IMAPClient (it's better than imaplib I swear!):
by ajaxaddicted on 8/7/13, 9:00 AM
by superchink on 8/7/13, 6:54 AM
by eliasmacpherson on 8/7/13, 8:54 AM
by duvander on 8/7/13, 4:48 AM
by deepGem on 8/7/13, 6:39 AM
by hatchoo on 8/7/13, 5:59 AM
I've been planning to create a Python script to help me automatically label my older emails based on content. This is a big help.
by ibudiallo on 8/7/13, 1:44 AM
Just when I needed it and wanted to write one you posted it. I don't think I would have done half the good job you did.
by arms on 8/7/13, 12:12 AM
by AnSavvides on 8/7/13, 9:20 AM
by bussiere on 8/7/13, 10:00 AM
by knes on 8/7/13, 12:26 AM
by maskedinvader on 8/7/13, 1:17 AM
by kudu on 8/7/13, 4:06 AM
by giis on 8/7/13, 11:37 AM