From: Joshua Roesslein Date: Sun, 19 Aug 2012 09:20:20 +0000 (-0700) Subject: Deprecating and removing tweepyshell. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=65a26c2b0d1dd182c50e6349af7fb8196187ff87;p=tweepy.git Deprecating and removing 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) -