From: vunhat_minh Date: Mon, 26 May 2014 02:41:41 +0000 (+0900) Subject: print adapt to screen size X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2a911483c40dc24c496c9716811a23b9e1bdbad0;p=rainbowstream.git print adapt to screen size --- 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():