-global_db_name = "xsetbg.db"
-
-global_db = shelve.open(global_db_name, flag='r')
-for key, value in sorted(global_db.items(), key=itemgetter(1), reverse=1):
- if key.startswith('/'):
- print value, key
-global_db.close()
+for row in xsetbg_db.select(orderBy='-last_shown'):
+ print row.id, row.last_shown, row.full_name.encode(default_encoding)