def get_password(self, service, username):
    'Get password of the username for the service\n        '
    try:
        key = ('Software\\%s\\Keyring' % service)
        hkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key)
        password_saved = winreg.QueryValueEx(hkey, username)[0]
        password_base64 = password_saved.encode('ascii')
        password_encrypted = base64.decodestring(password_base64)
        password = _win_crypto.decrypt(password_encrypted).decode('utf-8')
    except EnvironmentError:
        password = None
    return password
Get password of the username for the service
def get_password(self, service, username):
    '\n        '
    try:
        key = ('Software\\%s\\Keyring' % service)
        hkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key)
        password_saved = winreg.QueryValueEx(hkey, username)[0]
        password_base64 = password_saved.encode('ascii')
        password_encrypted = base64.decodestring(password_base64)
        password = _win_crypto.decrypt(password_encrypted).decode('utf-8')
    except EnvironmentError:
        password = None
    return password