Created
August 3, 2012 06:09
-
-
Save kaorimatz/3244975 to your computer and use it in GitHub Desktop.
List all keyring items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
def main(): | |
import gnomekeyring | |
for keyring in gnomekeyring.list_keyring_names_sync(): | |
for id in gnomekeyring.list_item_ids_sync(keyring): | |
item = gnomekeyring.item_get_info_sync(keyring, id) | |
print 'display name: ' + item.get_display_name() | |
print 'secret: ' + item.get_secret() | |
print 'attributes: ' | |
for name, value in gnomekeyring.item_get_attributes_sync(keyring, id).items(): | |
print ' %s = %s' % (name, value) | |
if __name__ == '__main__': | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment