summaryrefslogtreecommitdiff
path: root/play.py
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2011-03-08 07:25:09 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2011-03-08 07:27:55 (GMT)
commit0b3fab858e60a72bc0eb5173536bb805f03e3b7f (patch)
tree021906b97bbc51512457f0e6cf10eb5b421ca4e6 /play.py
parent0121330b57fcdcc600afe8d19dadf2f7d24d66d4 (diff)
downloadplay-0b3fab858e60a72bc0eb5173536bb805f03e3b7f.tar.xz
play: add ncurses 5.8 support
New ncurses limit checks enforce non-zero size.
Diffstat (limited to 'play.py')
-rwxr-xr-xplay.py4
1 files changed, 3 insertions, 1 deletions
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()