getting *term window dimensions w/o curses
Ralph Corderoy
ralph at inputplus.demon.co.uk
Sat Aug 11 11:12:11 EDT 2001
Hi Andrei,
> Is there some way to get aterm (and other terms) window dimension(s)
> without curses? I tried (so far) commands.getoutput("echo $LINES")
> but it doesn't return anything when used in a program, although it
> does work from an interpreter.. what gives?
What about reading the output of tput(1) and letting that do all the
hard graft?
% tput cols; tput lines
80
40
% tput cols ; tput lines
96
32
Ralph.
More information about the Python-list
mailing list