[Python-checkins] python/dist/src/Doc/lib liboptparse.tex,1.2,1.3

gward@users.sourceforge.net gward@users.sourceforge.net
Sat, 03 May 2003 12:16:39 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv15157

Modified Files:
	liboptparse.tex 
Log Message:
Fix various markup errors: use \longprogramopt{} more, and use it
correctly.  (Closes SF #731689.)  Use \emph{} in a few places.


Index: liboptparse.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboptparse.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** liboptparse.tex	18 Apr 2003 15:50:13 -0000	1.2
--- liboptparse.tex	3 May 2003 19:16:36 -0000	1.3
***************
*** 110,114 ****
  \begin{itemize}
  \item a hyphen followed by a few letters, e.g. \programopt{-pf} (this is
!       *not* the same as multiple options merged into a single
        argument.)
  \item a hyphen followed by a whole word, e.g. \programopt{-file} (this is
--- 110,114 ----
  \begin{itemize}
  \item a hyphen followed by a few letters, e.g. \programopt{-pf} (this is
!       \emph{not} the same as multiple options merged into a single
        argument.)
  \item a hyphen followed by a whole word, e.g. \programopt{-file} (this is
***************
*** 450,454 ****
  
  If \module{optparse} encounters either \programopt{-h} or
! \longprogramopt{--help} on the command-line, or if you just call
  \method{parser.print_help()}, it prints the following to stdout:
  
--- 450,454 ----
  
  If \module{optparse} encounters either \programopt{-h} or
! \longprogramopt{help} on the command-line, or if you just call
  \method{parser.print_help()}, it prints the following to stdout:
  
***************
*** 562,566 ****
  Note that ``\%prog'' is expanded just like it is in \var{usage}.  Apart from
  that, \var{version} can contain anything you like.  When you supply it,
! \module{optparse} automatically adds a\ longprogramopt{version} option to your
  parser. If it encounters this option on the command line, it expands
  your \var{version} string (by replacing ``\%prog''), prints it to
--- 562,566 ----
  Note that ``\%prog'' is expanded just like it is in \var{usage}.  Apart from
  that, \var{version} can contain anything you like.  When you supply it,
! \module{optparse} automatically adds a \longprogramopt{version} option to your
  parser. If it encounters this option on the command line, it expands
  your \var{version} string (by replacing ``\%prog''), prints it to
***************
*** 787,791 ****
  Clearly, the \var{type} and \var{dest} arguments are (usually) almost
  as important as \var{action}.  \var{action} is the only attribute that
! is meaningful for *all* options, though, so it is the most important.
  
  \subsubsection{Option actions\label{optparse-option-actions}}
--- 787,792 ----
  Clearly, the \var{type} and \var{dest} arguments are (usually) almost
  as important as \var{action}.  \var{action} is the only attribute that
! is meaningful for \emph{all} options, though, so it is the most
! important.
  
  \subsubsection{Option actions\label{optparse-option-actions}}
***************
*** 813,819 ****
  If \var{dest} is not supplied, \module{optparse} derives a
  destination from the first long option strings (e.g.,
! \longprogramopt{foo-bar} -> \var{foo_bar}).  If there are no long
  option strings, \module{optparse} derives a destination from the first
! short option string (e.g., \programopt{-f} -> \var{f}).
  
  Example:
--- 814,820 ----
  If \var{dest} is not supplied, \module{optparse} derives a
  destination from the first long option strings (e.g.,
! \longprogramopt{foo-bar} becomes \var{foo_bar}).  If there are no long
  option strings, \module{optparse} derives a destination from the first
! short option string (e.g., \programopt{-f} becomes \var{f}).
  
  Example:
***************
*** 903,907 ****
  \end{verbatim}
  
! If, a little later on, \samp{--tracks=4} is seen, it does:
  
  \begin{verbatim}
--- 904,908 ----
  \end{verbatim}
  
! If, a little later on, \longprogramopt{tracks=4} is seen, it does:
  
  \begin{verbatim}
***************
*** 911,915 ****
  See ``Error handling'' (section~\ref{optparse-error-handling}) for
  information on how \module{optparse} deals with something like
! \samp{--tracks=x}.
  
  \term{count} [required: \var{dest}]
--- 912,916 ----
  See ``Error handling'' (section~\ref{optparse-error-handling}) for
  information on how \module{optparse} deals with something like
! \longprogramopt{tracks=x}.
  
  \term{count} [required: \var{dest}]
***************
*** 983,989 ****
  \end{verbatim}
  
! If \module{optparse} sees either \longprogramopt{-h} or \longprogramopt{help} on
! the command line, it will print something like the following help
! message to stdout:
  
  \begin{verbatim}
--- 984,990 ----
  \end{verbatim}
  
! If \module{optparse} sees either \programopt{-h} or
! \longprogramopt{help} on the command line, it will print something
! like the following help message to stdout:
  
  \begin{verbatim}