<reponame>paulla/pycon_twitter_bot
# -*- coding: utf-8 -*-
import argparse
import ConfigParser

import twitter



def main():
        parser = argparse.ArgumentParser()
        parser.add_argument('--conf',
                        help='conf file')

        parser.add_argument('--status')

        args = parser.parse_args()

        config = ConfigParser.RawConfigParser()
        config.read(args.conf)

        api = twitter.Api(consumer_key=config.get('twitter', 'consumer_key'),
                          consumer_secret=config.get('twitter', 'consumer_secret'),
                          access_token_key=config.get('twitter', 'access_token_key'),
                          access_token_secret=config.get('twitter', 'access_token_secret'))
        print api.VerifyCredentials()

        status = api.PostUpdate(args.status)

# -*- coding: utf-8 -*-
import argparse
import ConfigParser

import twitter



def main():
        parser = argparse.ArgumentParser()
        parser.add_argument('--conf',
                        help='conf file')

        parser.add_argument('--status')

        args = parser.parse_args()

        config = ConfigParser.RawConfigParser()
        config.read(args.conf)

        api = twitter.Api(consumer_key=config.get('twitter', 'consumer_key'),
                          consumer_secret=config.get('twitter', 'consumer_secret'),
                          access_token_key=config.get('twitter', 'access_token_key'),
                          access_token_secret=config.get('twitter', 'access_token_secret'))
        print api.VerifyCredentials()

        status = api.PostUpdate(args.status)
# -*- coding: utf-8 -*-