a urllib2 wrapper for python