| Store | Cart

detect terminal width

From: Bruce Edge <bed...@troikanetworks.com>
Wed, 02 May 2001 07:43:35 -0700
[snip]

> env vars, then tigetstr("lines"), etc). def getheightwidth():>     height, width = struct.unpack(>         "hhhh", ioctl(0, TERMIOS.TIOCGWINSZ ,"\000"*8))[0:2]>     return height, width

Thanks, I have one more question, where is TERMIOS.TIOCGWINSZ defined in
2.1?

-Bruce.

Recent Messages in this Thread
Bruce Edge May 02, 2001 01:41 pm
Michael Hudson May 02, 2001 01:57 pm
Bruce Edge May 02, 2001 02:43 pm
Messages in this thread