From 74379648d3a1442d5811cca47bb82f5d9db1ba4d Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 12 Jan 2014 18:55:37 +0100 Subject: Terminal size override fix. --- pixelterm/__init__.py | 1 + pixelterm/gifterm.py | 6 ++++-- pixelterm/pixelterm.py | 0 3 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 pixelterm/pixelterm.py (limited to 'pixelterm') diff --git a/pixelterm/__init__.py b/pixelterm/__init__.py index e69de29..8692824 100644 --- a/pixelterm/__init__.py +++ b/pixelterm/__init__.py @@ -0,0 +1 @@ +__all__ = ['xtermcolors', 'pixelterm'] diff --git a/pixelterm/gifterm.py b/pixelterm/gifterm.py index 85c0428..0ebded1 100755 --- a/pixelterm/gifterm.py +++ b/pixelterm/gifterm.py @@ -14,10 +14,12 @@ def main(): parser.add_argument('-s', '--size', type=str, help='Terminal size, [W]x[H]') args = parser.parse_args() - tw, th = os.get_terminal_size() - th = th*2 + tw, th = None, None if args.size: tw, th = map(int, args.size.split('x')) + else: + tw, th = os.get_terminal_size() + th = th*2 img = Image.open(args.image) palette = img.getpalette() diff --git a/pixelterm/pixelterm.py b/pixelterm/pixelterm.py old mode 100644 new mode 100755 -- cgit