The same way you'd view data in a dict
: by iterating it.
Some of the database modules, including bsddb
, don't have an __iter__
method, but they all have keys
. So:
db = bsddb.hashopen("/home/neeraj/public_html/database/mydb.db","r")
for key in db.keys():
print('{}: {}'.format(key, db[key]))