getting *term window dimensions w/o curses
Erno Kuusela
erno-news at erno.iki.fi
Sun Aug 5 11:05:37 EDT 2001
In article <slrn9mqmjl.2rf.sill at sill.silmarill.org>,
sill at optonline.net (Andrei Kulakov) writes:
| Anyway, this solution doesn't work in 2.1 - termios module doesn't
| have this attribute, (TERMIOS is deprecated and doesn't have it either).
hmm, it works on my machine (debian, self built python 2.1):
>>> import TERMIOS
/usr/local/lib/python2.1/TERMIOS.py:7: DeprecationWarning: the TERMIOS module is deprecated; please use termios
DeprecationWarning)
>>> TERMIOS.TIOCGWINSZ
21523
>>> import termios
>>> termios.TIOCGWINSZ
21523
| What's tigetstr?
my guess is that it's a library function for accessing the terminfo
database. i don't think python exposes it.
-- erno
More information about the Python-list
mailing list