Logical markup.

This commit is contained in:
Fred Drake 1998-04-03 03:44:56 +00:00
parent dd1f52b0c4
commit 930f134fc9
2 changed files with 42 additions and 40 deletions

View file

@ -1,16 +1,16 @@
\section{Built-in Module \sectcode{binascii}} \section{Built-in Module \module{binascii}}
\label{module-binascii} \label{module-binascii}
\bimodindex{binascii} \bimodindex{binascii}
The binascii module contains a number of methods to convert between The \module{binascii} module contains a number of methods to convert
binary and various ascii-encoded binary representations. Normally, you between binary and various \ASCII{}-encoded binary
will not use these modules directly but use wrapper modules like representations. Normally, you will not use these modules directly but
\var{uu} or \var{hexbin} in stead, this module solely exists because use wrapper modules like \module{uu}\refstmodindex{uu} or
bit-manipuation of large amounts of data is slow in python. \module{hexbin}\refstmodindex{hexbin} instead, this module solely
exists because bit-manipuation of large amounts of data is slow in
Python.
The \code{binascii} module defines the following functions: The \module{binascii} module defines the following functions:
\setindexsubitem{(in module binascii)}
\begin{funcdesc}{a2b_uu}{string} \begin{funcdesc}{a2b_uu}{string}
Convert a single line of uuencoded data back to binary and return the Convert a single line of uuencoded data back to binary and return the
@ -19,9 +19,9 @@ last line. Line data may be followed by whitespace.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_uu}{data} \begin{funcdesc}{b2a_uu}{data}
Convert binary data to a line of ascii characters, the return value is Convert binary data to a line of \ASCII{} characters, the return value
the converted line, including a newline char. The length of \var{data} is the converted line, including a newline char. The length of
should be at most 45. \var{data} should be at most 45.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{a2b_base64}{string} \begin{funcdesc}{a2b_base64}{string}
@ -30,15 +30,15 @@ binary data. More than one line may be passed at a time.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_base64}{data} \begin{funcdesc}{b2a_base64}{data}
Convert binary data to a line of ascii characters in base64 coding. Convert binary data to a line of \ASCII{} characters in base64 coding.
The return value is the converted line, including a newline char. The return value is the converted line, including a newline char.
The length of \var{data} should be at most 57 to adhere to the base64 The length of \var{data} should be at most 57 to adhere to the base64
standard. standard.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{a2b_hqx}{string} \begin{funcdesc}{a2b_hqx}{string}
Convert binhex4 formatted ascii data to binary, without doing Convert binhex4 formatted \ASCII{} data to binary, without doing
rle-decompression. The string should contain a complete number of RLE-decompression. The string should contain a complete number of
binary bytes, or (in case of the last portion of the binhex4 data) binary bytes, or (in case of the last portion of the binhex4 data)
have the remaining bits zero. have the remaining bits zero.
\end{funcdesc} \end{funcdesc}
@ -49,7 +49,7 @@ standard. The algorithm uses \code{0x90} after a byte as a repeat
indicator, followed by a count. A count of \code{0} specifies a byte indicator, followed by a count. A count of \code{0} specifies a byte
value of \code{0x90}. The routine returns the decompressed data, value of \code{0x90}. The routine returns the decompressed data,
unless data input data ends in an orphaned repeat indicator, in which unless data input data ends in an orphaned repeat indicator, in which
case the \var{Incomplete} exception is raised. case the \exception{Incomplete} exception is raised.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{rlecode_hqx}{data} \begin{funcdesc}{rlecode_hqx}{data}
@ -58,9 +58,9 @@ result.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_hqx}{data} \begin{funcdesc}{b2a_hqx}{data}
Perform hexbin4 binary-to-ascii translation and return the resulting Perform hexbin4 binary-to-\ASCII{} translation and return the
string. The argument should already be rle-coded, and have a length resulting string. The argument should already be RLE-coded, and have a
divisible by 3 (except possibly the last fragment). length divisible by 3 (except possibly the last fragment).
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{crc_hqx}{data, crc} \begin{funcdesc}{crc_hqx}{data, crc}
@ -74,5 +74,6 @@ Exception raised on errors. These are usually programming errors.
\begin{excdesc}{Incomplete} \begin{excdesc}{Incomplete}
Exception raised on incomplete data. These are usually not programming Exception raised on incomplete data. These are usually not programming
errors, but handled by reading a little more data and trying again. errors, but may be handled by reading a little more data and trying
again.
\end{excdesc} \end{excdesc}

View file

@ -1,16 +1,16 @@
\section{Built-in Module \sectcode{binascii}} \section{Built-in Module \module{binascii}}
\label{module-binascii} \label{module-binascii}
\bimodindex{binascii} \bimodindex{binascii}
The binascii module contains a number of methods to convert between The \module{binascii} module contains a number of methods to convert
binary and various ascii-encoded binary representations. Normally, you between binary and various \ASCII{}-encoded binary
will not use these modules directly but use wrapper modules like representations. Normally, you will not use these modules directly but
\var{uu} or \var{hexbin} in stead, this module solely exists because use wrapper modules like \module{uu}\refstmodindex{uu} or
bit-manipuation of large amounts of data is slow in python. \module{hexbin}\refstmodindex{hexbin} instead, this module solely
exists because bit-manipuation of large amounts of data is slow in
Python.
The \code{binascii} module defines the following functions: The \module{binascii} module defines the following functions:
\setindexsubitem{(in module binascii)}
\begin{funcdesc}{a2b_uu}{string} \begin{funcdesc}{a2b_uu}{string}
Convert a single line of uuencoded data back to binary and return the Convert a single line of uuencoded data back to binary and return the
@ -19,9 +19,9 @@ last line. Line data may be followed by whitespace.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_uu}{data} \begin{funcdesc}{b2a_uu}{data}
Convert binary data to a line of ascii characters, the return value is Convert binary data to a line of \ASCII{} characters, the return value
the converted line, including a newline char. The length of \var{data} is the converted line, including a newline char. The length of
should be at most 45. \var{data} should be at most 45.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{a2b_base64}{string} \begin{funcdesc}{a2b_base64}{string}
@ -30,15 +30,15 @@ binary data. More than one line may be passed at a time.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_base64}{data} \begin{funcdesc}{b2a_base64}{data}
Convert binary data to a line of ascii characters in base64 coding. Convert binary data to a line of \ASCII{} characters in base64 coding.
The return value is the converted line, including a newline char. The return value is the converted line, including a newline char.
The length of \var{data} should be at most 57 to adhere to the base64 The length of \var{data} should be at most 57 to adhere to the base64
standard. standard.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{a2b_hqx}{string} \begin{funcdesc}{a2b_hqx}{string}
Convert binhex4 formatted ascii data to binary, without doing Convert binhex4 formatted \ASCII{} data to binary, without doing
rle-decompression. The string should contain a complete number of RLE-decompression. The string should contain a complete number of
binary bytes, or (in case of the last portion of the binhex4 data) binary bytes, or (in case of the last portion of the binhex4 data)
have the remaining bits zero. have the remaining bits zero.
\end{funcdesc} \end{funcdesc}
@ -49,7 +49,7 @@ standard. The algorithm uses \code{0x90} after a byte as a repeat
indicator, followed by a count. A count of \code{0} specifies a byte indicator, followed by a count. A count of \code{0} specifies a byte
value of \code{0x90}. The routine returns the decompressed data, value of \code{0x90}. The routine returns the decompressed data,
unless data input data ends in an orphaned repeat indicator, in which unless data input data ends in an orphaned repeat indicator, in which
case the \var{Incomplete} exception is raised. case the \exception{Incomplete} exception is raised.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{rlecode_hqx}{data} \begin{funcdesc}{rlecode_hqx}{data}
@ -58,9 +58,9 @@ result.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{b2a_hqx}{data} \begin{funcdesc}{b2a_hqx}{data}
Perform hexbin4 binary-to-ascii translation and return the resulting Perform hexbin4 binary-to-\ASCII{} translation and return the
string. The argument should already be rle-coded, and have a length resulting string. The argument should already be RLE-coded, and have a
divisible by 3 (except possibly the last fragment). length divisible by 3 (except possibly the last fragment).
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{crc_hqx}{data, crc} \begin{funcdesc}{crc_hqx}{data, crc}
@ -74,5 +74,6 @@ Exception raised on errors. These are usually programming errors.
\begin{excdesc}{Incomplete} \begin{excdesc}{Incomplete}
Exception raised on incomplete data. These are usually not programming Exception raised on incomplete data. These are usually not programming
errors, but handled by reading a little more data and trying again. errors, but may be handled by reading a little more data and trying
again.
\end{excdesc} \end{excdesc}