fnpickle(object, fileorname, protocol=None, append=False)¶
Pickle an object to a specified file.
The python object to pickle.
- fileornamestr or file-like
The filename or file into which the
objectshould be pickled. If a file object, it should have been opened in binary mode.
- protocolint or None
Pickle protocol to use - see the
picklemodule for details on these options. If None, the most recent protocol will be used.
If True, the object is appended to the end of the file, otherwise the file will be overwritten (if a file object is given instead of a file name, this has no effect).