[Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.13,1.14

Fred L. Drake python-dev@python.org
Wed, 9 Aug 2000 07:34:51 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv26751/lib

Modified Files:
	libcurses.tex 
Log Message:

Fix a few markup errors and lots of small consistency issues.

Add "See also" link to curses.wrapper module from curses module.


Index: libcurses.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** libcurses.tex	2000/08/04 07:35:41	1.13
--- libcurses.tex	2000/08/09 14:34:48	1.14
***************
*** 23,27 ****
                             settings.}
    \seemodule{curses.textpad}{Editable text widget for curses supporting 
! 			     Emacs-like bindings.}
    \seetext{Tutorial material on using curses with Python is available
             on the Python Web site as Andrew Kuchling's
--- 23,30 ----
                             settings.}
    \seemodule{curses.textpad}{Editable text widget for curses supporting 
! 			     \program{Emacs}-like bindings.}
!   \seemodule{curses.wrapper}{Convenience function to ensure proper
!                              terminal setup and resetting on
!                              application entry and exit.}
    \seetext{Tutorial material on using curses with Python is available
             on the Python Web site as Andrew Kuchling's
***************
*** 35,40 ****
  
  The module \module{curses} defines the following exception:
  \begin{excdesc}{error}
! Curses function returned an error status.
  \end{excdesc}
  
--- 38,44 ----
  
  The module \module{curses} defines the following exception:
+ 
  \begin{excdesc}{error}
! Exception raised when a curses library function returns an error.
  \end{excdesc}
  
***************
*** 968,973 ****
  \end{datadesc}
  
  
! \begin{tableii}{c|l}{code}{Attribute}{Meaning}
    \lineii{A_ALTCHARSET}{Alternate character set mode.}
    \lineii{A_BLINK}{Blink mode.}
--- 972,978 ----
  \end{datadesc}
  
+ Several constants are available to specify character cell attributes:
  
! \begin{tableii}{l|l}{code}{Attribute}{Meaning}
    \lineii{A_ALTCHARSET}{Alternate character set mode.}
    \lineii{A_BLINK}{Blink mode.}
***************
*** 980,989 ****
  
  Keys are referred to by integer constants with names starting with 
! \code{KEY_}.   The exact keycaps available are system dependent.
  
  % XXX this table is far too large!
  % XXX should this table be alphabetized?
  
! \begin{tableii}{c|l}{code}{Key constant}{Key}
    \lineii{KEY_MIN}{Minimum key value}
    \lineii{KEY_BREAK}{ Break key (unreliable) }
--- 985,994 ----
  
  Keys are referred to by integer constants with names starting with 
! \samp{KEY_}.   The exact keycaps available are system dependent.
  
  % XXX this table is far too large!
  % XXX should this table be alphabetized?
  
! \begin{tableii}{l|l}{code}{Key constant}{Key}
    \lineii{KEY_MIN}{Minimum key value}
    \lineii{KEY_BREAK}{ Break key (unreliable) }
***************
*** 1082,1093 ****
  \end{tableii}
  
! On VT100s and their software emulations such as X terminal emulators,
! there are normally at least four function keys (KEY_F1, KEY_F2,
! KEY_F3, KEY_F4) available and the arrow keys mapped to KEY_UP,
! KEY_DOWN, KEY_LEFT and KEY_RIGHT in the obvious way. If your machine has a PC
! keybboard, it is safe to expect arrow keys and twelve function keys; also,
! the following keypad mappings are standard:
  
! \begin{tableii}{c|l}{code}{Keycap}{code}
     \lineii{Insert}{KEY_IC}
     \lineii{Delete}{KEY_DC}
--- 1087,1100 ----
  \end{tableii}
  
! On VT100s and their software emulations, such as X terminal emulators,
! there are normally at least four function keys (\constant{KEY_F1},
! \constant{KEY_F2}, \constant{KEY_F3}, \constant{KEY_F4}) available,
! and the arrow keys mapped to \constant{KEY_UP}, \constant{KEY_DOWN},
! \constant{KEY_LEFT} and \constant{KEY_RIGHT} in the obvious way.  If
! your machine has a PC keybboard, it is safe to expect arrow keys and
! twelve function keys (older PC keyboards may have only ten function
! keys); also, the following keypad mappings are standard:
  
! \begin{tableii}{l|l}{kbd}{Keycap}{Constant}
     \lineii{Insert}{KEY_IC}
     \lineii{Delete}{KEY_DC}
***************
*** 1106,1110 ****
  been called.
  
! \begin{tableii}{c|l}{code}{ACS code}{Meaning}
    \lineii{ACS_BBSS}{alternate name for upper right corner}
    \lineii{ACS_BLOCK}{solid square block}
--- 1113,1117 ----
  been called.
  
! \begin{tableii}{l|l}{code}{ACS code}{Meaning}
    \lineii{ACS_BBSS}{alternate name for upper right corner}
    \lineii{ACS_BLOCK}{solid square block}
***************
*** 1154,1158 ****
  The following table lists the predefined colors:
  
! \begin{tableii}{c|l}{code}{Constant}{Color}
    \lineii{COLOR_BLACK}{Black}
    \lineii{COLOR_BLUE}{Blue}
--- 1161,1165 ----
  The following table lists the predefined colors:
  
! \begin{tableii}{l|l}{code}{Constant}{Color}
    \lineii{COLOR_BLACK}{Black}
    \lineii{COLOR_BLUE}{Blue}
***************
*** 1180,1187 ****
  module also provides a rectangle-drawing function useful for framing
  text boxes or for other purposes.
- 
- \subsection{Functions \label{curses-textpad-functions}}
  
! The module \module{curses.textpad} defines the following functions:
  
  \begin{funcdesc}{rectangle}{win, uly, ulx, lry, lrx}
--- 1187,1192 ----
  module also provides a rectangle-drawing function useful for framing
  text boxes or for other purposes.
  
! The module \module{curses.textpad} defines the following function:
  
  \begin{funcdesc}{rectangle}{win, uly, ulx, lry, lrx}
***************
*** 1197,1221 ****
  \end{funcdesc}
  
  \subsection{Textbox objects \label{curses-textpad-objects}}
  
  You can instantiate a \class{Textbox} object as follows:
  
! \classdesc{Textbox}{win}
! Return a textbox widget object.  The win argument should be a curses
! \class{WindowObject} in which the textbox is to be contained.  The
! edit cursor of the textbox is initially located at the upper left
! hand corner of the containin window, with coordinates (0,0). The
! instance's \member{stripspaces} flag is initially on.
  \end{classdesc}
  
! Textbox objects, have the following methods:
  
! \begin{methoddesc}{edit}{validator=None}
  This is the entry point you will normally use.  It accepts editing
! keystrokes until one of the termination keystrokes is entered.  If a
! validator function is specified, each entered keystroke is passed to
! it; command dispatch is done on the result. This method returns the
! window contents as a string; whether blanks in the window are included
! is affected by the \member{stripspaces} member.
  \end{methoddesc}
  
--- 1202,1228 ----
  \end{funcdesc}
  
+ 
  \subsection{Textbox objects \label{curses-textpad-objects}}
  
  You can instantiate a \class{Textbox} object as follows:
  
! \begin{classdesc}{Textbox}{win}
! Return a textbox widget object.  The \var{win} argument should be a
! curses \class{WindowObject} in which the textbox is to be contained.
! The edit cursor of the textbox is initially located at the upper left
! hand corner of the containin window, with coordinates \code{(0, 0)}.
! The instance's \member{stripspaces} flag is initially on.
  \end{classdesc}
  
! \class{Textbox} objects have the following methods:
  
! \begin{methoddesc}{edit}{\optional{validator}}
  This is the entry point you will normally use.  It accepts editing
! keystrokes until one of the termination keystrokes is entered.  If
! \var{validator} is supplied, it must be a function.  It will be called
! for each keystroke entered with the keystroke as a parameter; command
! dispatch is done on the result. This method returns the window
! contents as a string; whether blanks in the window are included is
! affected by the \member{stripspaces} member.
  \end{methoddesc}
  
***************
*** 1224,1228 ****
  keystrokes: 
  
! \begin{tableii}{c|l}{code}{keystroke}{action}
    \lineii{Ctrl-A}{Go to left edge of window.}
    \lineii{Ctrl-B}{Cursor left, wrapping to previous line if appropriate.}
--- 1231,1235 ----
  keystrokes: 
  
! \begin{tableii}{l|l}{kbd}{Keystroke}{Action}
    \lineii{Ctrl-A}{Go to left edge of window.}
    \lineii{Ctrl-B}{Cursor left, wrapping to previous line if appropriate.}
***************
*** 1242,1247 ****
  Move operations do nothing if the cursor is at an edge where the
  movement is not possible.  The following synonyms are supported where
! possible:  KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P,
! KEY_DOWN = Ctrl-N, KEY_BACKSPACE = Ctrl-h.
  
  All other keystrokes are treated as a command to insert the given
--- 1249,1261 ----
  Move operations do nothing if the cursor is at an edge where the
  movement is not possible.  The following synonyms are supported where
! possible:
! 
! \begin{tableii}{l|l}{constant}{Constant}{Keystroke}
!   \lineii{KEY_LEFT}{\kbd{Ctrl-B}}
!   \lineii{KEY_RIGHT}{\kbd{Ctrl-F}}
!   \lineii{KEY_UP}{\kbd{Ctrl-P}}
!   \lineii{KEY_DOWN}{\kbd{Ctrl-N}}
!   \lineii{KEY_BACKSPACE}{\kbd{Ctrl-h}}
! \end{tableii}
  
  All other keystrokes are treated as a command to insert the given
***************
*** 1255,1259 ****
  \end{methoddesc}
  
! \begin{methoddesc}{stripspaces}{}
  This data member is a flag which controls the interpretation of blanks in
  the window.  When it is on, trailing blanks on each line are ignored;
--- 1269,1273 ----
  \end{methoddesc}
  
! \begin{memberdesc}{stripspaces}
  This data member is a flag which controls the interpretation of blanks in
  the window.  When it is on, trailing blanks on each line are ignored;
***************
*** 1261,1273 ****
  to the end of that line instead, and trailing blanks are stripped when
  the window contents is gathered.
! \end{methoddesc}
  
  \section{\module{curses.wrapper} ---
!          Exception-handling wrapper for curses programs.}
  
  \declaremodule{standard}{curses.wrapper}
  \sectionauthor{Eric Raymond}{esr@thyrsus.com}
  \moduleauthor{Eric Raymond}{esr@thyrsus.com}
! \modulesynopsis{Exception-handling wrapper for curses programs.}
  \versionadded{1.6}
  
--- 1275,1288 ----
  to the end of that line instead, and trailing blanks are stripped when
  the window contents is gathered.
! \end{memberdesc}
  
+ 
  \section{\module{curses.wrapper} ---
!          Terminal handler for curses programs}
  
  \declaremodule{standard}{curses.wrapper}
  \sectionauthor{Eric Raymond}{esr@thyrsus.com}
  \moduleauthor{Eric Raymond}{esr@thyrsus.com}
! \modulesynopsis{Terminal configuration wrapper for curses programs.}
  \versionadded{1.6}
  
***************
*** 1277,1287 ****
  \function{wrapper()} will restore the terminal to a sane state before
  passing it further up the stack and generating a traceback.
- 
- \subsection{Functions \label{curses-wrapper-functions}}
  
! \begin{funcdesc}{wrapper}{func, *rest}
  Wrapper function that initializes curses and calls another function,
! \function{func}, restoring normal keyboard/screen behavior on error.
! The callable object 'func' is then passed the main window 'stdscr'
  as its first argument, followed by any other arguments passed to
  \function{wrapper()}.
--- 1292,1300 ----
  \function{wrapper()} will restore the terminal to a sane state before
  passing it further up the stack and generating a traceback.
  
! \begin{funcdesc}{wrapper}{func, \moreargs}
  Wrapper function that initializes curses and calls another function,
! \var{func}, restoring normal keyboard/screen behavior on error.
! The callable object \var{func} is then passed the main window 'stdscr'
  as its first argument, followed by any other arguments passed to
  \function{wrapper()}.