[Python-checkins] python/dist/src/Doc/lib libcmd.tex, 1.14, 1.14.14.1

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Fri Jul 30 20:57:58 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4344/lib

Modified Files:
      Tag: release23-maint
	libcmd.tex 
Log Message:
- make references to the readline module hyperlinks now that there is
  documentation to link to
- document the termination condition for cmd.Cmd.cmdloop()
- document the use of the return value for cmd.Cmd.do_*() methods


Index: libcmd.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v
retrieving revision 1.14
retrieving revision 1.14.14.1
diff -C2 -d -r1.14 -r1.14.14.1
*** libcmd.tex	6 Feb 2003 05:02:39 -0000	1.14
--- libcmd.tex	30 Jul 2004 18:57:55 -0000	1.14.14.1
***************
*** 12,16 ****
  later be wrapped in a more sophisticated interface.
  
! \begin{classdesc}{Cmd}{\optional{completekey},\optional{stdin},\optional{stdout}}
  A \class{Cmd} instance or subclass instance is a line-oriented
  interpreter framework.  There is no good reason to instantiate
--- 12,17 ----
  later be wrapped in a more sophisticated interface.
  
! \begin{classdesc}{Cmd}{\optional{completekey\optional{,
!                        stdin\optional{, stdout}}}}
  A \class{Cmd} instance or subclass instance is a line-oriented
  interpreter framework.  There is no good reason to instantiate
***************
*** 21,25 ****
  The optional argument \var{completekey} is the \refmodule{readline} name
  of a completion key; it defaults to \kbd{Tab}. If \var{completekey} is
! not \code{None} and \module{readline} is available, command completion
  is done automatically.
  
--- 22,26 ----
  The optional argument \var{completekey} is the \refmodule{readline} name
  of a completion key; it defaults to \kbd{Tab}. If \var{completekey} is
! not \code{None} and \refmodule{readline} is available, command completion
  is done automatically.
  
***************
*** 45,49 ****
  first prompt (this overrides the \member{intro} class member).
  
! If the \module{readline} module is loaded, input will automatically
  inherit \program{bash}-like history-list editing (e.g. \kbd{Control-P}
  scrolls back to the last command, \kbd{Control-N} forward to the next
--- 46,50 ----
  first prompt (this overrides the \member{intro} class member).
  
! If the \refmodule{readline} module is loaded, input will automatically
  inherit \program{bash}-like history-list editing (e.g. \kbd{Control-P}
  scrolls back to the last command, \kbd{Control-N} forward to the next
***************
*** 60,63 ****
--- 61,68 ----
  method \method{do_shell()} (if such a method is defined).
  
+ This method will return when the \method{postcmd()} method returns a
+ true value.  The \var{stop} argument to \method{postcmd()} is the
+ return value from the command's corresponding \method{do_*()} method.
+ 
  If completion is enabled, completing commands will be done
  automatically, and completing of commands args is done by calling
***************
*** 83,87 ****
  see the \method{precmd()} and \method{postcmd()} methods for useful
  execution hooks.  The return value is a flag indicating whether
! interpretation of commands by the interpreter should stop.
  \end{methoddesc}
  
--- 88,95 ----
  see the \method{precmd()} and \method{postcmd()} methods for useful
  execution hooks.  The return value is a flag indicating whether
! interpretation of commands by the interpreter should stop.  If there
! is a \method{do_*()} method for the command \var{str}, the return
! value of that method is returned, otherwise the return value from the
! \method{default()} method is returned.
  \end{methoddesc}
  
***************
*** 185,189 ****
  if false, \method{sys.stdout.write()} and
  \method{sys.stdin.readline()} are used. (This means that by
! importing \module{readline}, on systems that support it, the
  interpreter will automatically support Emacs-like line editing 
  and command-history keystrokes.)
--- 193,197 ----
  if false, \method{sys.stdout.write()} and
  \method{sys.stdin.readline()} are used. (This means that by
! importing \refmodule{readline}, on systems that support it, the
  interpreter will automatically support Emacs-like line editing 
  and command-history keystrokes.)



More information about the Python-checkins mailing list