From 0b3fab858e60a72bc0eb5173536bb805f03e3b7f Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Tue, 8 Mar 2011 08:25:09 +0100 Subject: play: add ncurses 5.8 support New ncurses limit checks enforce non-zero size. --- play.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/play.py b/play.py index 6e02198..27e07fe 100755 --- a/play.py +++ b/play.py @@ -140,7 +140,9 @@ class Window: except AttributeError: self.w.attr_off(attr) def newwin(self): - return curses.newwin(0, 0, 0, 0) + # http://mail.python.org/pipermail/python-list/2000-May/033180.html + self.parr, self.parc = os.popen('stty size', 'r').read().split() + return curses.newwin(int(self.parr), int(self.parc), 0, 0) def resize(self): self.w = self.newwin() -- cgit v1.2.3