bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ncurses, OS X and terminal size


From: Nicholas Cole
Subject: ncurses, OS X and terminal size
Date: Sat, 18 Mar 2006 15:59:41 +0000

The following python code seems to expose a bug in curses library on
OS X.  As far as I can tell this is a problem with the curses library
itself, rather than the python wrapper or the terminal applications.

The following python code attempts to print the size of the terminal. 
On a linux system the size of the terminal is updated as a terminal
window is resized.  However, on an OS X system, the size reported by
the following code is always the size of the terminal when the program
was executed.

Does anyone know why this would be?

Best wishes,

Nicholas


import curses
def main(screen):
        while 1:
                win = curses.newwin(0,0)
                y, x = win.getmaxyx()
                win.addstr("Terminal Size = %s x %s" % (y, x))
                win.refresh()
                curses.napms(100)


if __name__ == '__main__':
    curses.wrapper(main)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]