File: class/Extras/Other/PriorClasses/nasa-ksc-aug15/updatedb.py

import shelve
db = shelve.open('ksc.db')
for key in db.keys():
    print(key, '=>', db[key])

bob = db['bob']
print(bob.lastName(), bob.job)
sue = db['sue']
sue.giveRaise(.10)
db['sue'] = sue
db.close()



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