from person import Person, Manager bob = Person('bob smith') sue = Person('sue jones', job='dev', pay=50000) tom = Manager('tom smith', pay=60000) import shelve db = shelve.open('persondb') db['bob'] = bob db['sue'] = sue db['tom'] = tom db.close()