Commit b401637b authored by Fred Drake's avatar Fred Drake

Markup nits, index entries.

parent 674e0fd7
...@@ -2,22 +2,21 @@ ...@@ -2,22 +2,21 @@
\label{module-select} \label{module-select}
\bimodindex{select} \bimodindex{select}
This module provides access to the function \code{select} available in This module provides access to the function \cfunction{select()}
most \UNIX{} versions. It defines the following: available in most \UNIX{} versions. It defines the following:
\setindexsubitem{(in module select)}
\begin{excdesc}{error} \begin{excdesc}{error}
The exception raised when an error occurs. The accompanying value is The exception raised when an error occurs. The accompanying value is
a pair containing the numeric error code from \code{errno} and the a pair containing the numeric error code from \cdata{errno} and the
corresponding string, as would be printed by the C function corresponding string, as would be printed by the \C{} function
\code{perror()}. \cfunction{perror()}.
\end{excdesc} \end{excdesc}
\begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}} \begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}}
This is a straightforward interface to the \UNIX{} \code{select()} This is a straightforward interface to the \UNIX{} \cfunction{select()}
system call. The first three arguments are lists of `waitable system call. The first three arguments are lists of `waitable
objects': either integers representing \UNIX{} file descriptors or objects': either integers representing \UNIX{} file descriptors or
objects with a parameterless method named \code{fileno()} returning objects with a parameterless method named \method{fileno()} returning
such an integer. The three lists of waitable objects are for input, such an integer. The three lists of waitable objects are for input,
output and `exceptional conditions', respectively. Empty lists are output and `exceptional conditions', respectively. Empty lists are
allowed. The optional \var{timeout} argument specifies a time-out as a allowed. The optional \var{timeout} argument specifies a time-out as a
...@@ -31,13 +30,17 @@ without a file descriptor becoming ready, three empty lists are ...@@ -31,13 +30,17 @@ without a file descriptor becoming ready, three empty lists are
returned. returned.
Amongst the acceptable object types in the lists are Python file Amongst the acceptable object types in the lists are Python file
objects (e.g. \code{sys.stdin}, or objects returned by \code{open()} objects (e.g. \code{sys.stdin}, or objects returned by
or \code{posix.popen()}), socket objects returned by \function{open()} or \function{os.popen()}), socket objects
\code{socket.socket()}, and the module \code{stdwin} which happens to returned by \function{socket.socket()},%
define a function \code{fileno()} for just this purpose. You may \withsubitem{(in module socket)}{\ttindex{socket()}}
\withsubitem{(in module posix)}{\ttindex{popen()}}
\withsubitem{(in module os)}{\ttindex{popen()}}
and the module \module{stdwin}\refbimodindex{stdwin} which happens to
define a function \function{fileno()}%
\withsubitem{(in module stdwin)}{\ttindex{fileno()}}
for just this purpose. You may
also define a \dfn{wrapper} class yourself, as long as it has an also define a \dfn{wrapper} class yourself, as long as it has an
appropriate \code{fileno()} method (that really returns a \UNIX{} file appropriate \method{fileno()} method (that really returns a \UNIX{}
descriptor, not just a random integer). file descriptor, not just a random integer).
\end{funcdesc} \end{funcdesc}
\ttindex{socket}
\ttindex{stdwin}
...@@ -2,22 +2,21 @@ ...@@ -2,22 +2,21 @@
\label{module-select} \label{module-select}
\bimodindex{select} \bimodindex{select}
This module provides access to the function \code{select} available in This module provides access to the function \cfunction{select()}
most \UNIX{} versions. It defines the following: available in most \UNIX{} versions. It defines the following:
\setindexsubitem{(in module select)}
\begin{excdesc}{error} \begin{excdesc}{error}
The exception raised when an error occurs. The accompanying value is The exception raised when an error occurs. The accompanying value is
a pair containing the numeric error code from \code{errno} and the a pair containing the numeric error code from \cdata{errno} and the
corresponding string, as would be printed by the C function corresponding string, as would be printed by the \C{} function
\code{perror()}. \cfunction{perror()}.
\end{excdesc} \end{excdesc}
\begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}} \begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}}
This is a straightforward interface to the \UNIX{} \code{select()} This is a straightforward interface to the \UNIX{} \cfunction{select()}
system call. The first three arguments are lists of `waitable system call. The first three arguments are lists of `waitable
objects': either integers representing \UNIX{} file descriptors or objects': either integers representing \UNIX{} file descriptors or
objects with a parameterless method named \code{fileno()} returning objects with a parameterless method named \method{fileno()} returning
such an integer. The three lists of waitable objects are for input, such an integer. The three lists of waitable objects are for input,
output and `exceptional conditions', respectively. Empty lists are output and `exceptional conditions', respectively. Empty lists are
allowed. The optional \var{timeout} argument specifies a time-out as a allowed. The optional \var{timeout} argument specifies a time-out as a
...@@ -31,13 +30,17 @@ without a file descriptor becoming ready, three empty lists are ...@@ -31,13 +30,17 @@ without a file descriptor becoming ready, three empty lists are
returned. returned.
Amongst the acceptable object types in the lists are Python file Amongst the acceptable object types in the lists are Python file
objects (e.g. \code{sys.stdin}, or objects returned by \code{open()} objects (e.g. \code{sys.stdin}, or objects returned by
or \code{posix.popen()}), socket objects returned by \function{open()} or \function{os.popen()}), socket objects
\code{socket.socket()}, and the module \code{stdwin} which happens to returned by \function{socket.socket()},%
define a function \code{fileno()} for just this purpose. You may \withsubitem{(in module socket)}{\ttindex{socket()}}
\withsubitem{(in module posix)}{\ttindex{popen()}}
\withsubitem{(in module os)}{\ttindex{popen()}}
and the module \module{stdwin}\refbimodindex{stdwin} which happens to
define a function \function{fileno()}%
\withsubitem{(in module stdwin)}{\ttindex{fileno()}}
for just this purpose. You may
also define a \dfn{wrapper} class yourself, as long as it has an also define a \dfn{wrapper} class yourself, as long as it has an
appropriate \code{fileno()} method (that really returns a \UNIX{} file appropriate \method{fileno()} method (that really returns a \UNIX{}
descriptor, not just a random integer). file descriptor, not just a random integer).
\end{funcdesc} \end{funcdesc}
\ttindex{socket}
\ttindex{stdwin}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment