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