from .c_image import *
from .py3patch import *
from .emoji import *
-from .util import printTwitterErrors
+from .util import *
# Global values
g = {}
notice += light_magenta('You should upgrade with ')
notice += light_green('pip install -U rainbowstream')
printNicely(notice)
+ else:
+ 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',
- 'q'
+ 'v',
+ 'q',
]
# Handle function set
pause,
replay,
clear,
- quit
+ upgrade_center,
+ quit,
]
[], # pause
[], # reconnect
[], # clear
+ [], # version
[], # quit
]
))
except TwitterHTTPError as e:
printNicely('')
printNicely(
- magenta("We have maximum connection problem with twitter'stream API right now :("))
- printTwitterErrors(e)
+ magenta("We have connection problem with twitter'stream API right now :("))
+ detail_twitter_error(e)
+ sys.stdout.write(g['decorated_name'](c['PREFIX']))
+ sys.stdout.flush()
def fly():
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."))
+ magenta("We have connection problem with twitter'REST API right now :("))
+ detail_twitter_error(e)
save_history()
sys.exit()
# Proxy connection problem