From 8440d31cc90c10adc5404d485c35b080c2ec711e Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Tue, 8 Dec 2009 00:11:15 -0600 Subject: [PATCH] Added tweepy.debug() method that allows enabling debug info printing. Currently this just sets httplib.HTTPConnection.debuglevel=1. --- tweepy/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) 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 + -- 2.25.1