]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/cmdline.py
Fix the shell. Broken since the Python 3 move. I guess nobody uses it. :(
[z_archive/twitter.git] / twitter / cmdline.py
index 8353df3473eff11d79af3e76c624cb8bb76d04a8..c99c692a6cfe90e5b941b7c35615f865ac74fcd0 100644 (file)
@@ -64,6 +64,12 @@ prompt: <twitter_shell_prompt e.g. '[cyan]twitter[R]> '>
 
 from __future__ import print_function
 
+try:
+    input = __builtins__['raw_input']
+except AttributeError:
+    pass
+
+
 CONSUMER_KEY='uS6hO2sV6tDKIOeVjhnFnQ'
 CONSUMER_SECRET='MEYTOS97VvlHX7K1rwHPEqVpTSqZ71HtvoK4sVuYk'
 
@@ -352,6 +358,7 @@ class Action(object):
             if (options['refresh'] and isinstance(action, StatusAction)):
                 while True:
                     doAction()
+                    sys.stdout.flush()
                     time.sleep(options['refresh_rate'])
             else:
                 doAction()