Guido van Rossum | e76b7a8 | 1997-04-27 21:25:52 +0000 | [diff] [blame^] | 1 | \section{Standard Module \sectcode{quopri}} |
| 2 | \stmodindex{quopri} |
| 3 | |
| 4 | This module performs quoted-printable transport encoding and decoding, |
| 5 | as defined in RFC 1521: ``MIME (Multipurpose Internet Mail Extensions) |
| 6 | Part One''. The quoted-printable encoding is designed for data where |
| 7 | there are relatively few nonprintable characters; the base-64 encoding |
| 8 | scheme available via the \code{base64} module is more compact if there |
| 9 | are many such characters, as when sending a graphics file. |
| 10 | \indexii{quoted printable}{encoding} |
| 11 | \indexii{RFC}{1521} |
| 12 | \index{MIME!quoted-printable encoding} |
| 13 | |
| 14 | \begin{funcdesc}{decode}{input\, output} |
| 15 | Decode the contents of the \var{input} file and write the resulting |
| 16 | decoded binary data to the \var{output} file. |
| 17 | \var{input} and \var{output} must either be file objects or objects that |
| 18 | mimic the file object interface. \var{input} will be read until |
| 19 | \code{\var{input}.read()} returns an empty string. |
| 20 | \end{funcdesc} |
| 21 | |
| 22 | \begin{funcdesc}{encode}{input\, output\, quotetabs} |
| 23 | Encode the contents of the \var{input} file and write the resulting |
| 24 | quoted-printable data to the \var{output} file. |
| 25 | \var{input} and \var{output} must either be file objects or objects that |
| 26 | mimic the file object interface. \var{input} will be read until |
| 27 | \code{\var{input}.read()} returns an empty string. |
| 28 | \end{funcdesc} |
| 29 | |
| 30 | |
| 31 | |