Move twitter-bot to api/demos/.

(imported from commit eb0a9466b9064f89322ab593134af0761caeea8a)
This commit is contained in:
Jessica McKellar 2013-03-08 11:24:52 -05:00
parent 2c7f3a7745
commit 2225cbf758

View file

@ -3,13 +3,11 @@ import os
import sys import sys
import optparse import optparse
import ConfigParser import ConfigParser
from os import path
import humbug
CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc") CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc")
sys.path.append(path.join(path.dirname(__file__), '../api'))
import humbug
def write_config(config, since_id, user): def write_config(config, since_id, user):
config.set('twitter', 'since_id', since_id) config.set('twitter', 'since_id', since_id)
config.set('twitter', 'user_id', user) config.set('twitter', 'user_id', user)
@ -87,7 +85,7 @@ if not consumer_key or not consumer_secret or not access_token_key or not access
try: try:
import twitter import twitter
except ImportError: except ImportError:
parser.error("Install twitter-python") parser.error("Please install twitter-python")
api = twitter.Api(consumer_key=consumer_key, api = twitter.Api(consumer_key=consumer_key,
consumer_secret=consumer_secret, consumer_secret=consumer_secret,