xmlrpc.client.Binary

class xmlrpc.client.Binary

This class may be initialized from bytes data (which may include NULs). The primary access to the content of a Binary object is provided by an attribute:

data

The binary data encapsulated by the Binary instance. The data is provided as a bytes object.

Binary objects have the following methods, supported mainly for internal use by the marshalling/unmarshalling code:

decode(bytes)

Accept a base64 bytes object and decode it as the instance’s new data.

encode(out)

Write the XML-RPC base 64 encoding of this binary item to the out stream object.

The encoded data will have newlines every 76 characters as per RFC 2045 section 6.8, which was the de facto standard base64 specification when the XML-RPC spec was written.

It also supports certain of Python’s built-in operators through __eq__() and __ne__() methods.

doc_python
2016-10-07 17:48:31
Comments
Leave a Comment

Please login to continue.