import urllib op = urllib.FancyURLopener(key_file='client.key', cert_file='client.cert') f = op.open('https://localhost:8000')