The pickle and cPickle Module
The pickle and cPickle modules serialize objects to and from files
Notes
- Most built-in types can be pickled except for files, sockets, execution frames, etc...
- The data-encoding is Python-specific.
- Any file-like object that provides write(),read(), and readline() methods can be used as a file.
- Recursive objects are correctly handled.
- cPickle is like pickle, but written in C and is substantially faster.
- pickle can be subclassed, cPickle can not.
|