marshal.dump()

marshal.dump(value, file[, version])

Write the value on the open file. The value must be a supported type. The file must be an open file object such as sys.stdout or returned by open() or os.popen(). It must be opened in binary mode ('wb' or 'w+b').

If the value has (or contains an object that has) an unsupported type, a ValueError exception is raised — but garbage data will also be written to the file. The object will not be properly read back by load().

The version argument indicates the data format that dump should use (see below).

doc_python
2016-10-07 17:36:57
Comments
Leave a Comment

Please login to continue.