~ubuntu-branches/ubuntu/karmic/python3.0/karmic

« back to all changes in this revision

Viewing changes to Doc/howto/curses.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-16 17:18:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216171823-1d5cm5qnnjvmnzzm
Tags: 3.0.1-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
297
297
could code::
298
298
 
299
299
   stdscr.addstr(0, 0, "Current mode: Typing mode",
300
 
              curses.A_REVERSE)
 
300
                 curses.A_REVERSE)
301
301
   stdscr.refresh()
302
302
 
303
303
The curses library also supports color on those terminals that provide it, The
399
399
 
400
400
   curses.echo()            # Enable echoing of characters
401
401
 
402
 
   # Get a 15-character string, with the cursor on the top line 
403
 
   s = stdscr.getstr(0,0, 15)  
 
402
   # Get a 15-character string, with the cursor on the top line
 
403
   s = stdscr.getstr(0,0, 15)
404
404
 
405
405
The Python :mod:`curses.textpad` module supplies something better. With it, you
406
406
can turn a window into a text box that supports an Emacs-like set of