uu

The uu module is used to encode and decode files in uuencode format, a data encoding sometimes used when transferring binary data over an ASCII-only connection.

encode(input, output [, name [, mode]])

Uuencodes a file. input is a file object opened for reading or a filename. output is a file object opened for writing or a filename. name specifies the name of the file that’s encoded in the uuencoded file. mode specifies the mode of the file. By default, name and mode are taken from the input file.

decode(input [, output [, mode [, quiet]]])

Decodes a uuencoded file. input is a file object opened for reading or a filename. output is a file object opened for writing or a filename. mode is used to set permission bits and overrides the setting ...

Get Python: Essential Reference, Third 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.