Added tweepy.debug() method that allows enabling debug info printing.
authorJoshua Roesslein <jroesslein@gmail.com>
Tue, 8 Dec 2009 06:11:15 +0000 (00:11 -0600)
committerJoshua Roesslein <jroesslein@gmail.com>
Tue, 8 Dec 2009 06:11:15 +0000 (00:11 -0600)
Currently this just sets httplib.HTTPConnection.debuglevel=1.

tweepy/__init__.py

index 55a941d75e9b915bfeef76f50e3883f75e5e450e..89b54d5503c1c10a0dba4b96cdce096b0f4dd247 100644 (file)
@@ -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
+