]> jfr.im git - z_archive/twitter.git/commitdiff
Merge remote-tracking branch 'original/master'
authorTomas Neme <redacted>
Sat, 16 Jun 2012 00:00:34 +0000 (21:00 -0300)
committerTomas Neme <redacted>
Sat, 16 Jun 2012 00:00:34 +0000 (21:00 -0300)
1  2 
twitter/cmdline.py

diff --combined twitter/cmdline.py
index aafe262b8279f90c74bad2e7a35491895ae9ec6a,c99c692a6cfe90e5b941b7c35615f865ac74fcd0..247e8a62d2a02b7f13252cad1882a6c9af2dc3bb
@@@ -64,6 -64,12 +64,12 @@@ prompt: <twitter_shell_prompt e.g. '[cy
  
  from __future__ import print_function
  
+ try:
+     input = __builtins__['raw_input']
+ except AttributeError:
+     pass
  CONSUMER_KEY='uS6hO2sV6tDKIOeVjhnFnQ'
  CONSUMER_SECRET='MEYTOS97VvlHX7K1rwHPEqVpTSqZ71HtvoK4sVuYk'
  
@@@ -106,7 -112,6 +112,7 @@@ OPTIONS = 
      'datestamp': False,
      'extra_args': [],
      'secure': True,
 +    'invert_split': False,
  }
  
  def parse_args(args, options):
@@@ -491,8 -496,6 +497,8 @@@ class SetStatusAction(Action)
              splitted.append(" ".join((replies,statusTxt[:end])))
              statusTxt = statusTxt[end:]
  
 +        if options['invert_split']:
 +            splitted.reverse()
          for status in splitted:
              twitter.statuses.update(status=status)
  
@@@ -591,10 -594,6 +597,10 @@@ def loadConfig(filename)
          for option in ('format', 'prompt'):
              if cp.has_option('twitter', option):
                  options[option] = cp.get('twitter', option)
 +        # process booleans
 +        for option in ('invert_split',):
 +            if cp.has_option('twitter', option ):
 +                options[option] = cp.getboolean('twitter', option)
      return options
  
  def main(args=sys.argv[1:]):