cmd = ['powershell', '-Command', 
    '[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials;  (new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)'
     % vars()]
subprocess.check_call(cmd)
Installing Python's easy_install using ez_setup.py from behind a proxy server