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