Wednesday, October 26, 2011

python debug with urllib2 or httplib

with httplib,as see in dive into python if we put line
h=urllib2.HTTPHandler(debuglevel=1) into source code,we will see all debug information displayed
but that is not working with urllib2,with urllib2,we have to put
h=urllib2.HTTPHandler(debuglevel=1) in source code,and add h as a handler while build opener,then we see all debug information in console

No comments:

Post a Comment