#!/usr/bin/python # # Retrieves specified number of tweets from Twitter # # Version: 0.1 # import sys import tweepy MAX_COUNT=200 if __name__ == "__main__": count = MAX_COUNT try: username = sys.argv[1] except IndexError: print "Usage: %s []" % sys.argv[0] raise SystemExit if len(sys.argv) == 3: count = int(sys.argv[2]) response = tweepy.api.user_timeline(username, count=count) for status in response: print status.text print