Curses Programming with Python 2.01

Curses Programming with Python 2.01

A.M. Kuchling, Eric S. Raymond
3.0 / 4.0
0 comments
Sukakah anda buku ini?
Bagaimana kualiti fail ini?
Muat turun buku untuk menilai kualitinya
Bagaimana kualiti fail yang dimuat turun?
This document describes how to write text-mode programs with Python 2.x, using the curses extension module to control the display. This document is available from the Python HOWTO page at

What is curses?

The curses library supplies a terminal-independent screen-painting and keyboard-handling facility for text-based terminals; such terminals include VT100s, the Linux console, and the simulated terminal provided by X11 programs such as xterm and rxvt. Display terminals support various control codes to perform common operations such as moving the cursor, scrolling the screen, and erasing areas. Different terminals use widely differing codes, and often have their own minor quirks.

In a world of X displays, one might ask “why bother”? It’s true that character-cell display terminals are an obsolete technology, but there are niches in which being able to do fancy things with them are still valuable. One is on small-footprint or embedded Unixes that don’t carry an X server. Another is for tools like OS installers and kernel configurators that may have to run before X is available.

The curses library hides all the details of different terminals, and provides the programmer with an abstraction of a display, containing multiple non-overlapping windows. The contents of a window can be changed in various ways – adding text, erasing it, changing its appearance–and the curses library will automagically figure out what control codes need to be sent to the terminal to produce the right output

Tahun:
2003
Bahasa:
english
Halaman:
7
Fail:
PDF, 29 KB
IPFS:
CID , CID Blake2b
english, 2003
Baca dalam Talian
Penukaran menjadi sedang dijalankan
Penukaran menjadi gagal

Istilah utama