Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import keyring
- # check "remember me" checkbox by default
- def __init__(self):
- # ... UI stuff
- def logon_clicked(self):
- username = "username"
- password = "password"
- if remember_me_checkbox.ischecked:
- # TODO: See how windows names keyring entries
- keyring.set_password("kronos_wfc", username, password)
- else:
- if keyring.get_password("kronos_wfc", username) is not None:
- keyring.delete_password("kronos_wfc", username)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement