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