O'Reilly logo

Python Essential Reference, Second Edition by David M Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required