From: Joshua Roesslein Date: Tue, 8 Dec 2009 06:11:15 +0000 (-0600) Subject: Added tweepy.debug() method that allows enabling debug info printing. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8440d31cc90c10adc5404d485c35b080c2ec711e;p=tweepy.git Added tweepy.debug() method that allows enabling debug info printing. Currently this just sets httplib.HTTPConnection.debuglevel=1. --- diff --git a/tweepy/__init__.py b/tweepy/__init__.py index 55a941d..89b54d5 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -20,3 +20,8 @@ from tweepy.cursor import Cursor # Global, unauthenticated instance of API api = API() +def debug(enable=True, level=1): + + import httplib + httplib.HTTPConnection.debuglevel = level +