Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6016e39

Browse files
committed
Document the new encodestring() and decodestring() functions. Also,
add some description of what the quotetabs argument does for the encode*() functions. Finally, add a "see also" pointing to the base64 module.
1 parent 92c5bdb commit 6016e39

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

Doc/lib/libquopri.tex

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,35 @@ \section{\module{quopri} ---
2121
decoded binary data to the \var{output} file.
2222
\var{input} and \var{output} must either be file objects or objects that
2323
mimic the file object interface. \var{input} will be read until
24-
\code{\var{input}.read()} returns an empty string.
24+
\code{\var{input}.readline()} returns an empty string.
2525
\end{funcdesc}
2626

2727
\begin{funcdesc}{encode}{input, output, quotetabs}
2828
Encode the contents of the \var{input} file and write the resulting
2929
quoted-printable data to the \var{output} file.
3030
\var{input} and \var{output} must either be file objects or objects that
3131
mimic the file object interface. \var{input} will be read until
32-
\code{\var{input}.read()} returns an empty string.
32+
\code{\var{input}.readline()} returns an empty string.
33+
\var{quotetabs} is a flag which controls whether to encode embedded
34+
spaces and tabs; when true it encodes such embedded whitespace, and
35+
when false it leaves them unencoded. Note that spaces and tabs
36+
appearing at the end of lines are always encoded, as per \rfc{1521}.
37+
\end{funcdesc}
38+
39+
\begin{funcdesc}{decodestring}{s}
40+
Like \function{decode()}, except that it accepts a source string and
41+
returns the corresponding decoded string.
42+
\end{funcdesc}
43+
44+
\begin{funcdesc}{encodestring}{s\optional{, quotetabs}}
45+
Like \function{encode()}, except that it accepts a source string and
46+
returns the corresponding encoded string. \var{quotetabs} is optional
47+
(defaulting to 0), and is passed straight through to
48+
\function{encode()}.
3349
\end{funcdesc}
3450

3551

3652
\begin{seealso}
3753
\seemodule{mimify}{General utilities for processing of MIME messages.}
54+
\seemodule{base64}{Encode and decode MIME base64 data}
3855
\end{seealso}

0 commit comments

Comments
 (0)