From 65a26c2b0d1dd182c50e6349af7fb8196187ff87 Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Sun, 19 Aug 2012 02:20:20 -0700 Subject: [PATCH] Deprecating and removing tweepyshell. --- tools/tweepyshell | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 tools/tweepyshell diff --git a/tools/tweepyshell b/tools/tweepyshell deleted file mode 100755 index 5a2f09c..0000000 --- a/tools/tweepyshell +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -from getpass import getpass -from optparse import OptionParser -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. -""" - -opt = OptionParser(usage='tweepyshell [options] ') -opt.add_option('-d', '--debug', - action='store_true', - dest='debug', - help='enable debug mode') -options, args = opt.parse_args() - -if len(args) == 1: - auth = BasicAuthHandler(args[0], getpass()) -elif len(args) == 2: - auth = BasicAuthHandler(args[0], args[1]) -else: - auth = None - -if options.debug: - tweepy.debug() - -local_ns = {'tweepy': tweepy, 'api': API(auth)} -shellbanner = '' - -try: - import IPython - ipshell = IPython.Shell.IPShell([''], user_ns = local_ns) - ipshell.mainloop(sys_exit=1, banner = shellbanner) -except ImportError: - import code - code.interact(shellbanner, local = local_ns) - -- 2.25.1