import dill # Save the file dill.dump(myObject, file = open("myObject.pickle", "wb")) # Reload the file myObject = dill.load(open("myObject.pickle", "rb"))