Function
quopri.encode

Signature

encode(input, output, quotetabs, header=0)

Documentation String

Read input, apply quoted-printable encoding, and write to output.

input and output are files with readline() and write() methods. The quotetabs flag indicates whether embedded tabs and spaces should be quoted. Note that line-ending tabs and spaces are always encoded, as per RFC 1521. The header flag indicates whether we are encoding spaces as _ as per RFC 1522.