~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/library/curses.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
:mod:`curses` --- Terminal handling for character-cell displays
3
2
===============================================================
4
3
 
5
4
.. module:: curses
6
 
   :synopsis: An interface to the curses library, providing portable terminal handling.
 
5
   :synopsis: An interface to the curses library, providing portable terminal
 
6
              handling.
 
7
   :platform: Unix
7
8
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
8
9
.. sectionauthor:: Eric Raymond <esr@thyrsus.com>
9
10
 
10
 
 
11
11
.. versionchanged:: 1.6
12
12
   Added support for the ``ncurses`` library and converted to a package.
13
13
 
186
186
 
187
187
.. function:: filter()
188
188
 
189
 
   The :func:`filter` routine, if used, must be called before :func:`initscr` is
 
189
   The :func:`.filter` routine, if used, must be called before :func:`initscr` is
190
190
   called.  The effect is that, during those calls, LINES is set to 1; the
191
191
   capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and the home
192
192
   string is set to the value of cr. The effect is that the cursor is confined to
609
609
   .. note::
610
610
 
611
611
      A *character* means a C character (an ASCII code), rather then a Python
612
 
      character (a string of length 1). (This note is true whenever the documentation
613
 
      mentions a character.) The builtin :func:`ord` is handy for conveying strings to
614
 
      codes.
 
612
      character (a string of length 1). (This note is true whenever the
 
613
      documentation mentions a character.) The built-in :func:`ord` is handy for
 
614
      conveying strings to codes.
615
615
 
616
616
   Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any
617
617
   character previously painter at that location.  By default, the character
796
796
 
797
797
   Get a character. Note that the integer returned does *not* have to be in ASCII
798
798
   range: function keys, keypad keys and so on return numbers higher than 256. In
799
 
   no-delay mode, -1 is returned if there is  no input.
 
799
   no-delay mode, -1 is returned if there is no input, else :func:`getch` waits
 
800
   until a key is pressed.
800
801
 
801
802
 
802
803
.. method:: window.getkey([y, x])