debuglevel for a HTTP request

Carbon Man darwin at nowhere.com
Tue Mar 24 16:46:22 EDT 2009


#Python 2.5
# from Dive Into Python 11.5

import httplib
httplib.HTTPConnection.debuglevel = 1
import urllib2
request = urllib2.Request('http://localhost/test/atom.xml')
opener = urllib2.build_opener()
feeddata = opener.open(request).read()

It doesn't show the debug output, any ideas? 





More information about the Python-list mailing list