#! /usr/bin/env python
# -*- coding: utf-8 -*-

import tweepy, sys

# Auth
KEY = "**********"
SECRET = "**********************"
ATOKEN = "*********************************************"
ASECRET = "*****************************************"
auth = tweepy.OAuthHandler(KEY, SECRET)
auth.set_access_token(ATOKEN, ASECRET)

# How to
# ex) tail-f foo.log | python stdinput_tweet.py

api = tweepy.API(auth)
while True:
        line = sys.stdin.readline()
        api.update_status(line)
