diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-03-08 08:25:09 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-03-08 08:27:55 +0100 |
commit | 0b3fab858e60a72bc0eb5173536bb805f03e3b7f (patch) | |
tree | 021906b97bbc51512457f0e6cf10eb5b421ca4e6 | |
parent | 0121330b57fcdcc600afe8d19dadf2f7d24d66d4 (diff) | |
download | play-0b3fab858e60a72bc0eb5173536bb805f03e3b7f.tar.xz |
play: add ncurses 5.8 support
New ncurses limit checks enforce non-zero size.
-rwxr-xr-x | play.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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() |