Re: how to change system-wide proxy settings by Python ?

2013-02-03 Thread Michael Torrie
On 02/03/2013 08:34 AM, iMath wrote:
> I have already known a valid proxy server(63.141.216.159)and
> port(8087) which support both http and https protocols ,so how to
> change system-wide proxy settings to this proxy by Python ? I use
> WinXP ,can you show  me an example of this ? thanks in advance !

There really is no way on any operating system to set a system-wide
proxy that is honored by every program that does http.

However if you can change the one "Internet Settings" proxy
programmatically, any windows app that use the IE browser engine will
pick it up.  One method to do this is to interact with the registry.
You can google for the appropriate key.  Setting it for all users,
though, is a bit trickier.  Your script would need privileges to access
keys in HKEY_LOCAL_MACHINE.

But be warned that other programs like firefox and Chrome will not
automatically know about this setting or honor it.  Or any program that
implements its own http requests with sockets.  It's not something that
can be enforced as a sort of policy.  If you need that kind of
enforcing, you'll have to work with the network hardware to block
un-proxied http and https traffic.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to change system-wide proxy settings by Python ?

2013-02-03 Thread Kwpolska
On Sun, Feb 3, 2013 at 4:34 PM, iMath  wrote:
> I have already known a valid proxy server(63.141.216.159)and port(8087) which 
> support both http and https protocols ,so how to change system-wide proxy 
> settings to this proxy by Python ?
> I use WinXP ,can you show  me an example of this ?
> thanks in advance !
> --
> http://mail.python.org/mailman/listinfo/python-list

This may help you:

http://stackoverflow.com/questions/1068212/programmatically-detect-system-proxy-settings-on-windows-xp-with-python

Next time, please use Google before you ask.
-- 
Kwpolska  | GPG KEY: 5EAAEA16
stop html mail| always bottom-post
http://asciiribbon.org| http://caliburn.nl/topposting.html
-- 
http://mail.python.org/mailman/listinfo/python-list


how to change system-wide proxy settings by Python ?

2013-02-03 Thread iMath
I have already known a valid proxy server(63.141.216.159)and port(8087) which 
support both http and https protocols ,so how to change system-wide proxy 
settings to this proxy by Python ?
I use WinXP ,can you show  me an example of this ?
thanks in advance !
-- 
http://mail.python.org/mailman/listinfo/python-list