diff options
Diffstat (limited to 'Doc/library/quopri.rst')
-rw-r--r-- | Doc/library/quopri.rst | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/Doc/library/quopri.rst b/Doc/library/quopri.rst index 7ceb661..d7c7204 100644 --- a/Doc/library/quopri.rst +++ b/Doc/library/quopri.rst @@ -21,25 +21,24 @@ sending a graphics file. .. function:: decode(input, output, header=False) Decode the contents of the *input* file and write the resulting decoded binary - data to the *output* file. *input* and *output* must either be file objects or - objects that mimic the file object interface. *input* will be read until - ``input.readline()`` returns an empty string. If the optional argument *header* - is present and true, underscore will be decoded as space. This is used to decode - "Q"-encoded headers as described in :rfc:`1522`: "MIME (Multipurpose Internet - Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text". + data to the *output* file. *input* and *output* must be :term:`file objects + <file object>`. *input* will be read until ``input.readline()`` returns an + empty string. If the optional argument *header* is present and true, underscore + will be decoded as space. This is used to decode "Q"-encoded headers as + described in :rfc:`1522`: "MIME (Multipurpose Internet Mail Extensions) + Part Two: Message Header Extensions for Non-ASCII Text". .. function:: encode(input, output, quotetabs, header=False) Encode the contents of the *input* file and write the resulting quoted-printable - data to the *output* file. *input* and *output* must either be file objects or - objects that mimic the file object interface. *input* will be read until - ``input.readline()`` returns an empty string. *quotetabs* is a flag which - controls whether to encode embedded spaces and tabs; when true it encodes such - embedded whitespace, and when false it leaves them unencoded. Note that spaces - and tabs appearing at the end of lines are always encoded, as per - :rfc:`1521`. *header* is a flag which controls if spaces are encoded as - underscores as per :rfc:`1522`. + data to the *output* file. *input* and *output* must be :term:`file objects + <file object>`. *input* will be read until ``input.readline()`` returns an + empty string. *quotetabs* is a flag which controls whether to encode embedded + spaces and tabs; when true it encodes such embedded whitespace, and when + false it leaves them unencoded. Note that spaces and tabs appearing at the + end of lines are always encoded, as per :rfc:`1521`. *header* is a flag + which controls if spaces are encoded as underscores as per :rfc:`1522`. .. function:: decodestring(s, header=False) |