Hi,

I am using below python code (Python 2.7) to reset the proxy of my Ubuntu
(Cent OS 6) system, but I am unable to reset the proxy:

Code :
import os
         print "Unsetting http..."
         os.system("unset http_proxy")
         os.system("echo $http_proxy")
         print "http is reset"

Output :
        Unsetting http...
        http://web-proxy.xxxx.xxxxxxx.net:8080
        http is reset
Process finished with exit code 0

It should not return ' http://web-proxy.xxxx.xxxxxxx.net:8080 ' in output.

I run the same unset command  from terminal , then I see that proxy is
reset:

[trex@sumlnxvm ~]$ unset $HTTP_PROXY
[trex@sumlnxvm ~]$ echo $HTTP_PROXY

[trex@sumlnxvm ~]$


Please suggest how to reset system proxy using Python Code

Regards,
Sumit
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to