From 0c82d474685c6bddfecfa9e3b9308be1ed105f41 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Fri, 6 Nov 2009 16:48:27 -0600 Subject: [PATCH] Added back the tweepyshell. --- tweepyshell | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tweepyshell diff --git a/tweepyshell b/tweepyshell new file mode 100755 index 0000000..56127d3 --- /dev/null +++ b/tweepyshell @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +import sys + +import code +import tweepy +from tweepy import API, BasicAuthHandler + +"""Launch an interactive shell ready for Tweepy usage + +This script is handy for debugging tweepy during development +or to just play around with the library. +It imports tweepy and creates an authenticated API instance (api) +using the credentials provided. +""" + +if len(sys.argv) != 3: + print 'Usage: tweepyshell ' + exit(1) + +api = API(BasicAuthHandler(username=sys.argv[1], password=sys.argv[2])) + +code.interact('', local={'tweepy': tweepy, 'api': api}) + -- 2.25.1