Python/HTTP Basic Authentication
import urllib, httplib2, base64 http = httplib2.Http() auth = base64.encodestring(username + ':' + password) response, content = http.request(url, 'GET', headers={ 'Authorization' : 'Basic ' + auth })
Categorised as: note