Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 cPickle 来腌制整数列表,使用 HIGHEST_PROTOCOL,
cPickle.dump(l, f, HIGHEST_PROTOCOL)
当我尝试使用以下代码取消腌制时,我得到一个 EOFError。我尝试在 unpickling 之前“寻求”偏移 0,但错误仍然存在。
l = cPickle.load(f)
有任何想法吗?
如果您在 Windows 上,请确保您
open(filename, 'wb') # for writing open(filename, 'rb') # for reading