[Python-checkins] cpython (2.7): #11363: add missing functions from curses doc. Patch by Sandro Tosi.

ezio.melotti python-checkins at python.org
Sun Jun 26 12:39:57 CEST 2011


http://hg.python.org/cpython/rev/3dc602b1f4a2
changeset:   70992:3dc602b1f4a2
branch:      2.7
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Sun Jun 26 13:34:56 2011 +0300
summary:
  #11363: add missing functions from curses doc. Patch by Sandro Tosi.

files:
  Doc/library/curses.rst |  48 ++++++++++++++++++++++++++++++
  1 files changed, 48 insertions(+), 0 deletions(-)


diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -299,6 +299,12 @@
       cause the interpreter to exit.
 
 
+.. function:: is_term_resized(nlines, ncols)
+
+   Return ``True`` if :func:`resize_term` would modify the window structure,
+   ``False`` otherwise.
+
+
 .. function:: isendwin()
 
    Return ``True`` if :func:`endwin` has been called (that is, the  curses library has
@@ -468,6 +474,35 @@
    :func:`def_shell_mode`.
 
 
+.. function:: resetty()
+
+   Restore the state of the terminal modes to what it was at the last call to
+   :func:`savetty`.
+
+
+.. function:: resize_term(nlines, ncols)
+
+   Backend function used by :func:`resizeterm`, performing most of the work;
+   when resizing the windows, :func:`resize_term` blank-fills the areas that are
+   extended.  The calling application should fill in these areas with
+   appropriate data.  The :func:`resize_term` function attempts to resize all
+   windows.  However, due to the calling convention of pads, it is not possible
+   to resize these without additional interaction with the application.
+
+
+.. function:: resizeterm(nlines, ncols)
+
+   Resize the standard and current windows to the specified dimensions, and
+   adjusts other bookkeeping data used by the curses library that record the
+   window dimensions (in particular the SIGWINCH handler).
+
+
+.. function:: savetty()
+
+   Save the current state of the terminal modes in a buffer, usable by
+   :func:`resetty`.
+
+
 .. function:: setsyx(y, x)
 
    Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both -1, then
@@ -801,6 +836,11 @@
    Return a tuple ``(y, x)`` of co-ordinates of upper-left corner.
 
 
+.. method:: window.getbkgd()
+
+   Return the given window's current background character/attribute pair.
+
+
 .. method:: window.getch([y, x])
 
    Get a character. Note that the integer returned does *not* have to be in ASCII
@@ -1046,6 +1086,14 @@
    *sminrow*, or *smincol* are treated as if they were zero.
 
 
+.. method:: window.resize(nlines, ncols)
+
+   Reallocate storage for a curses window to adjust its dimensions to the
+   specified values.  If either dimension is larger than the current values, the
+   window's data is filled with blanks that have the current background
+   rendition (as set by :meth:`bkgdset`) merged into them.
+
+
 .. method:: window.scroll([lines=1])
 
    Scroll the screen or scrolling region upward by *lines* lines.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list