From e01a74776c421b309da1f878f401da734482fa53 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Wed, 9 Mar 2011 06:34:07 +0100 Subject: play: use which() for stty --- play.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'play.py') 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 -Copyright (C) 2008-2010 Adrian C. +Copyright (C) 2008-2011 Adrian C. 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() -- cgit v1.2.3