From 1face01942898157799ada3ec26dc9068e32670a Mon Sep 17 00:00:00 2001 From: Vu Nhat Minh Date: Wed, 2 Jul 2014 16:49:13 +0900 Subject: [PATCH] globals --- rainbowstream/draw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rainbowstream/draw.py b/rainbowstream/draw.py index bddc524..e949fb2 100644 --- a/rainbowstream/draw.py +++ b/rainbowstream/draw.py @@ -21,7 +21,7 @@ def color_func(func_name): Call color function base on name """ pure = func_name.encode('utf8') - return locals()[pure] + return globals()[pure] def draw(t, iot=False, keyword=None, fil=[], ig=[]): @@ -193,7 +193,7 @@ def show_profile(u, iot=False): friends_count = color_func(PROFILE['friends_count'])(str(friends_count) + ' following') followers_count = color_func(PROFILE['followers_count'])(str(followers_count) + ' followers') count = statuses_count + ' ' + friends_count + ' ' + followers_count - user = cycle_color(name) + color_func(PROFILE['nick']()' @' + screen_name + ' : ') + count + user = cycle_color(name) + color_func(PROFILE['nick'])(' @' + screen_name + ' : ') + count profile_image_raw_url = 'Profile photo: ' + color_func(PROFILE['profile_image_url'])(profile_image_url) description = ''.join( map(lambda x: x + ' ' * 4 if x == '\n' else x, description)) -- 2.25.1