File: class/Workbook/Examples/Lecture12/testpickle.py

import pickle
 
def saveDbase(filename, table):
    file = open(filename, 'w')
    pickle.dump(table, file)        # pickle to file
    file.close()
 
def loadDbase(filename):
    file = open(filename, 'r')
    table = pickle.load(file)       # unpickle from file
    file.close()
    return table



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