[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using ncurses only for terminfo (no I/O)
From: |
Thomas Dickey |
Subject: |
Re: Using ncurses only for terminfo (no I/O) |
Date: |
Fri, 15 Jan 2021 20:08:20 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Fri, Jan 15, 2021 at 11:22:33PM -0000, Grant Edwards wrote:
> I've recently been working with ncurses from Python, and would like to
> use ncurses only for terminfo purposes. I can call tigetstr() and then
> tparm() if needed, and write the result using Python's normal output
> stream. Everything works as expected using urxvt, but what sort of
> failure modes I should be expecting because I'm not using tputs() or
> putp() as specified in the man page?
man ncurses:
NCURSES_NO_PADDING
Most of the terminal descriptions in the terminfo database are written
for real "hardware" terminals. Many people use terminal emulators
which run in a windowing environment and use curses-based applications.
Terminal emulators can duplicate all of the important aspects of a
hardware terminal, but they do not have the same limitations. The
chief limitation of a hardware terminal from the standpoint of your ap‐
plication is the management of dataflow, i.e., timing. Unless a hard‐
ware terminal is interfaced into a terminal concentrator (which does
flow control), it (or your application) must manage dataflow, prevent‐
ing overruns. The cheapest solution (no hardware cost) is for your
program to do this by pausing after operations that the terminal does
slowly, such as clearing the display.
As a result, many terminal descriptions (including the vt100) have de‐
lay times embedded. You may wish to use these descriptions, but not
want to pay the performance penalty.
Set the NCURSES_NO_PADDING environment variable to disable all but
mandatory padding. Mandatory padding is used as a part of special con‐
trol sequences such as flash.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature