News for hackers. Stuff that matters.
Re:Show HN: Python library to read and manage your Gmail by spindritf on Tuesday August 06, 2013 @06:10PM (#6169561)
You can also retrieve the password from your system keyring[1]

    import keyring

    pass_is = keyring.get_password('gmail', '[email protected]')
you set it with

    set_password(servicename, username, password)
so

    set_password('gmail', '[email protected]', 'one of those per app passwords if you use 2factor for example')
[1] https://pypi.python.org/pypi/keyring
Re:Show HN: Python library to read and manage your Gmail by grinich on Tuesday August 06, 2013 @11:17PM (#6170613)
Even better, use oauth2 tokens instead of your username/password.

Here's a script to generate them: https://google-mail-oauth2-tools.googlecode.com/svn/trunk/py...

Re:Show HN: Python library to read and manage your Gmail by codezero on Tuesday August 06, 2013 @07:51PM (#6169980)
That's amazing, I never knew this existed, thanks!