python/dist/src/Doc/lib libshlex.tex,1.17,1.18

Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11976 Modified Files: libshlex.tex Log Message: - general markup cleanup - rearrange so two small sections become one; this avoids an extra page in the HTML format Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** libshlex.tex 8 Sep 2003 18:52:18 -0000 1.17 --- libshlex.tex 31 Dec 2003 05:18:46 -0000 1.18 *************** *** 13,42 **** The \class{shlex} class makes it easy to write lexical analyzers for simple syntaxes resembling that of the \UNIX{} shell. This will often ! be useful for writing minilanguages, (e.g. in run control files for ! Python applications) or for parsing quoted strings. ! ! \begin{seealso} ! \seemodule{ConfigParser}{Parser for configuration files similar to the ! Windows \file{.ini} files.} ! \end{seealso} ! ! ! \subsection{Module Contents} The \module{shlex} module defines the following functions: ! \begin{funcdesc}{split}{s\optional{, comments=\code{False}}} Split the string \var{s} using shell-like syntax. If \var{comments} is ! \code{False}, the parsing of comments in the given string will be ! disabled (setting the \member{commenters} member of the \class{shlex} ! instance to the empty string). This function operates in \POSIX{} mode. \versionadded{2.3} \end{funcdesc} ! The \module{shlex} module defines the following classes: ! \begin{classdesc}{shlex}{\optional{instream=\code{sys.stdin}\optional{, ! infile=\code{None}\optional{, ! posix=\code{False}}}}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to --- 13,34 ---- The \class{shlex} class makes it easy to write lexical analyzers for simple syntaxes resembling that of the \UNIX{} shell. This will often ! be useful for writing minilanguages, (for example, in run control ! files for Python applications) or for parsing quoted strings. The \module{shlex} module defines the following functions: ! \begin{funcdesc}{split}{s\optional{, comments}} Split the string \var{s} using shell-like syntax. If \var{comments} is ! \constant{False} (the default), the parsing of comments in the given ! string will be disabled (setting the \member{commenters} member of the ! \class{shlex} instance to the empty string). This function operates ! in \POSIX{} mode. \versionadded{2.3} \end{funcdesc} ! The \module{shlex} module defines the following class: ! \begin{classdesc}{shlex}{\optional{instream\optional{, ! infile\optional{, posix}}}} A \class{shlex} instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to *************** *** 52,58 **** operate in compatibility mode. When operating in \POSIX{} mode, \class{shlex} will try to be as close as possible to the \POSIX{} shell ! parsing rules. See~\ref{shlex-objects}. \end{classdesc} \subsection{shlex Objects \label{shlex-objects}} --- 44,56 ---- operate in compatibility mode. When operating in \POSIX{} mode, \class{shlex} will try to be as close as possible to the \POSIX{} shell ! parsing rules. See section~\ref{shlex-objects}. \end{classdesc} + \begin{seealso} + \seemodule{ConfigParser}{Parser for configuration files similar to the + Windows \file{.ini} files.} + \end{seealso} + + \subsection{shlex Objects \label{shlex-objects}} *************** *** 86,90 **** the result is an absolute pathname, or there was no previous source request in effect, or the previous source was a stream ! (e.g. \code{sys.stdin}), the result is left alone. Otherwise, if the result is a relative pathname, the directory part of the name of the file immediately before it on the source inclusion stack is prepended --- 84,88 ---- the result is an absolute pathname, or there was no previous source request in effect, or the previous source was a stream ! (such as \code{sys.stdin}), the result is left alone. Otherwise, if the result is a relative pathname, the directory part of the name of the file immediately before it on the source inclusion stack is prepended *************** *** 269,273 **** or the escape character itself. Otherwise the escape character will be considered a normal character. ! \item EOF is signaled with a \code{None} value; \item Quoted empty strings (\code{''}) are allowed; \end{itemize} --- 267,271 ---- or the escape character itself. Otherwise the escape character will be considered a normal character. ! \item EOF is signaled with a \constant{None} value; \item Quoted empty strings (\code{''}) are allowed; \end{itemize}
participants (1)
-
fdrake@users.sourceforge.net