11/15/2018

data dump by pickle in python

Data dump by pickle

see below example:

data dump to file 
import pickle
f = open("any_file.dmp', "wb")
f.write(pickle.dumps(data))
f.close()

data load by dump
data = pickle.loads(open("any_file.dmp", "rb").read())




No comments:

Post a Comment