from .c_image import *
from .py3patch import *
from .emoji import *
+from .util import printTwitterErrors
# Global values
g = {}
notice += light_green('pip install -U rainbowstream')
printNicely(notice)
else:
- printNicely(yellow('You are running latest ' + current + ' version.'))
+ notice = light_yellow('You are running latest version (')
+ notice += light_green(current)
+ notice += light_yellow(')')
+ printNicely(notice)
except:
pass
usage += s * 2 + light_green('p') + ' will pause the stream.\n'
usage += s * 2 + light_green('r') + ' will unpause the stream.\n'
usage += s * 2 + light_green('c') + ' will clear the screen.\n'
+ usage += s * 2 + light_green('v') + ' will show version info.\n'
usage += s * 2 + light_green('q') + ' will quit.\n'
# End
usage += '\n'
'p',
'r',
'c',
+ 'v',
'q',
- 'version',
]
# Handle function set
pause,
replay,
clear,
- quit,
upgrade_center,
+ quit,
]
[], # pause
[], # reconnect
[], # clear
- [], # quit
[], # version
+ [], # quit
]
))
init_interactive_shell(d)
elif tweet.get('event'):
c['events'].append(tweet)
print_event(tweet)
- except TwitterHTTPError:
+ except TwitterHTTPError as e:
printNicely('')
printNicely(
magenta("We have maximum connection problem with twitter'stream API right now :("))
+ printTwitterErrors(e)
def fly():
proxy_connect(args)
init(args)
# Twitter API connection problem
- except TwitterHTTPError:
+ except TwitterHTTPError as e:
printNicely('')
printNicely(
magenta("We have connection problem with twitter'stream API right now :("))
+ printTwitterErrors(e)
printNicely(magenta("Let's try again later."))
save_history()
sys.exit()