From 2a911483c40dc24c496c9716811a23b9e1bdbad0 Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Mon, 26 May 2014 11:41:41 +0900 Subject: [PATCH] print adapt to screen size --- rainbowstream/rainbow.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 9461d22..00621d0 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -136,11 +136,13 @@ def search(): """ t = Twitter(auth=authen()) rel = t.search.tweets(q='#' + g['stuff'])['statuses'] - printNicely(grey('**************************************************************************************\n')) + h, w = os.popen('stty size', 'r').read().split() + + printNicely(grey('*'*int(w)+'\n')) print('Newest',SEARCH_MAX_RECORD, 'tweet: \n') for i in xrange(5): draw(t=rel[i],keyword=g['stuff'].strip()) - printNicely(grey('**************************************************************************************\n')) + printNicely(grey('*'*int(w)+'\n')) def friend(): -- 2.25.1