From ab7880779d12eb8a7317bf2190253eb5e04396b5 Mon Sep 17 00:00:00 2001 From: Jin Suk Park Date: Sat, 26 Dec 2015 00:52:37 +0000 Subject: [PATCH] fixed shutil.get_terminal_size error --- butterfly/bin/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/butterfly/bin/help.py b/butterfly/bin/help.py index c3559ef..1528d4d 100644 --- a/butterfly/bin/help.py +++ b/butterfly/bin/help.py @@ -4,6 +4,7 @@ from butterfly.utils import ansi_colors import os import base64 import shutil +import subprocess print(ansi_colors.white + "Welcome to the butterfly help." + ansi_colors.reset) path = os.getenv('BUTTERFLY_PATH') @@ -56,7 +57,7 @@ Butterfly is a xterm compliant terminal built with python and javascript. code=ansi_colors.light_yellow, comment=ansi_colors.light_magenta, reset=ansi_colors.reset, - rcol=shutil.get_terminal_size()[0] - 31, + rcol=int(subprocess.check_output(['stty','size']).split()[1]) - 31, main=os.path.normpath(os.path.join( os.path.abspath(os.path.dirname(__file__)), '../sass/'))))