open stty in a shell

This commit is contained in:
Romain Bignon 2011-03-14 17:34:48 +01:00
commit 99785b5a4d

View file

@ -85,7 +85,7 @@ class IFormatter(object):
# XXX if stdin is not a tty, it seems that the command fails.
if os.isatty(sys.stdout.fileno()) and os.isatty(sys.stdin.fileno()):
self.termrows = int( subprocess.Popen('stty size', stdout=subprocess.PIPE).communicate()[0].split()[0])
self.termrows = int( subprocess.Popen('stty size', shell=True, stdout=subprocess.PIPE).communicate()[0].split()[0])
def after_format(self, formatted):
if self.outfile != sys.stdout: