Internet Data Handling and Encoding
The modules in this section are used to encode and decode data formats that are widely used in Internet applications.
base64
The base64 module is used to encode and decode data using base64 encoding. base64 is commonly used to encode binary data in mail attachments.
decode(input, output)
Decodes base64-encoded data. input is a filename or a file object open for reading. output is a filename or a file object open for writing.
decodestring(s)
Decodes a base64-encoded string s . Returns a string containing the decoded binary data.
encode(input, output)
Encodes data using base64. input is a filename or a file object open for reading. output is a filename or a file object open for writing.
encodestring( ...
Get Python Essential Reference, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.