summaryrefslogtreecommitdiff
path: root/play.py
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2011-03-09 05:34:07 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2011-03-09 05:34:07 (GMT)
commite01a74776c421b309da1f878f401da734482fa53 (patch)
treec645559f6e11dd9bb9083dfe115cdbbcefe6a1e9 /play.py
parent0b3fab858e60a72bc0eb5173536bb805f03e3b7f (diff)
downloadplay-e01a74776c421b309da1f878f401da734482fa53.tar.xz
play: use which() for stty
Diffstat (limited to 'play.py')
-rwxr-xr-xplay.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/play.py b/play.py
index 27e07fe..06b3212 100755
--- a/play.py
+++ b/play.py
@@ -6,7 +6,7 @@ __version__ = "play 1.00"
"""
play - A curses front-end for various audio players based on cplay
Copyright (C) 1998-2005 Ulf Betlehem <flu@iki.fi>
-Copyright (C) 2008-2010 Adrian C. <anrxc@sysphere.org>
+Copyright (C) 2008-2011 Adrian C. <anrxc@sysphere.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,7 +46,8 @@ except: pass
# ------------------------------------------
XTERM = re.search("rxvt|xterm", os.environ["TERM"])
-CONTROL_FIFO = "%s/play-control-%s" % (os.environ.get("TMPDIR", "/tmp"), os.environ["USER"])
+CONTROL_FIFO = "%s/play-control-%s" % (
+ os.environ.get("TMPDIR", "/tmp"), os.environ["USER"])
# ------------------------------------------
def which(program):
@@ -141,8 +142,8 @@ class Window:
def newwin(self):
# 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)
+ self.prc = os.popen('%s size' % which('stty'), 'r').read().split()
+ return curses.newwin(int(self.prc[0]), int(self.prc[1]), 0, 0)
def resize(self):
self.w = self.newwin()