File: class/Workbook/Exercises/Lab9/per2.py

import shelve

def dumpshelve(name):
    db = shelve.open(name)
    for key in db.keys():
        print "%s => %s" % (key, db[key])

if __name__ == '__main__':
    dumpshelve('testdb')



[Home page] Books Code Blog Python Author Train Find ©M.Lutz