def shelve_open(filename, flag='c', protocol=None, writeback=False):
 import dumbdbm
 return shelve.Shelf(dumbdbm.open(filename, flag), protocol, writeback)

def shelve_open ( filename , flag = 'c' , protocol = None , writeback = False ) : import dumbdbm return shelve . Shelf ( dumbdbm . open ( filename , flag ) , protocol , writeback )
a more system-portable wrapper around shelve .