摘要: python对象与文件之间的序列化和反序列化:pickle.dump()pickle.load()pickle.dump(obj, file, [,protocol])protocol=>0 ASCII,1 older protocol,2 new protocol, it is necessary to open with'rb,wb'if protocal>=1pickle.load(file) 1 import pickle 2 3 #can pickleable something like tuple,set list dictionary 4 table 阅读全文
posted @ 2014-01-02 23:15 Yu Zi 阅读(338) 评论(0) 推荐(0)