code: def post(arguments):
      '''Post text to a given twitter account.'''
      twitter = api.API(arguments)
      params = {}
  
      if arguments.update == '-':
          params['status'] = sys.stdin.read()
      else:
          params['status'] = arguments.update
  
      if arguments.media_file:
          medias = [twitter.media_upload(m) for m in arguments.media_file]
          params['media_ids'] = [m.media_id for m in medias]
  
      try:
          logging.getLogger(arguments.screen_name).info('status: %s', params['status'])
          if not arguments.dry_run:
              twitter.update_status(**params)
  
      except tweepy.TweepError as e:
          logging.getLogger(arguments.screen_name).error(e.messagef post(arguments):
      '''Post text to a given twitter account.'''
      twitter = api.API(arguments)
      params = {}
  
      if arguments.update == '-':
          params['status'] = sys.stdin.read()
      else:
          params['status'] = arguments.update
  
      if arguments.media_file:
          medias = [twitter.media_upload(m) for m in arguments.media_file]
          params['media_ids'] = [m.media_id for m in medias]
  
      try:
          logging.getLogger(arguments.screen_name).info('status: %s', params['status'])
          if not arguments.dry_run:
              twitter.update_status(**params)
  
      except tweepy.TweepError as e:
          logging.getLogger(arguments.screen_name).error(e.message)
docs: Post text to a given twitter account.