I am new to Python and would like to write a script to change Windows proxy settings based on the network I am connected to. Is there any existing python module I can use? Appreciate your help.
Thanks, Sethu
I am new to Python and would like to write a script to change Windows proxy settings based on the network I am connected to. Is there any existing python module I can use? Appreciate your help.
Thanks, Sethu
Cannot you set the HTTP_PROXY environment variable in Windows (either manually or within your program) for your application before sending the request? That should take care that any request you send it via urllib2 goes via Proxy.
I'm having similar question too. At the moment, I just use
os
module and using Windowsreg
command to get the proxy setting from registry. Hope this helps.I would use
winreg
and query the settings directly from the registry.For example, something like: