summaryrefslogtreecommitdiff
path: root/Doc/library/quopri.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:11:28 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:11:28 +0000
commit11cb961b38550443d287b2b55174e504c2309af2 (patch)
tree51b2972800e593dde1b5f5154b9b044058a350d7 /Doc/library/quopri.rst
parent6a11a98b7c8f576d7663182cbd09123eb108a928 (diff)
downloadcpython-git-11cb961b38550443d287b2b55174e504c2309af2.tar.gz
Add cross-references to the glossary entry for file objects.
Diffstat (limited to 'Doc/library/quopri.rst')
-rw-r--r--Doc/library/quopri.rst27
1 files changed, 13 insertions, 14 deletions
diff --git a/Doc/library/quopri.rst b/Doc/library/quopri.rst
index 7ceb66147b..d7c7204074 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)