How to reset system proxy using pyhton code

2018-02-19 Thread Sum J
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" O

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Thanks Chris :) Its working now. Regards, Sumit On Thu, Feb 15, 2018 at 4:55 PM, Chris Warrick wrote: > On 15 February 2018 at 12:07, Sum J wrote: > > Below is my code. Here I want to read the "ip address" from s > > > > > > s= ''' &g

Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio Module: Unknown noise: -097 signalStrength: -046 ip address: 192.168.75.147 subnet mask: 255.255.255.0 IPv4 address configured by DHCP Mac Addr: a

Re: [Python-Dev] How to set/update value in a xml file using requests in python

2018-02-12 Thread Sum J
t; You likely will want a PUT or a POST HTTP verb: > https://stackoverflow.com/questions/107390/whats-the- > difference-between-a-post-and-a-put-http-request > > HTH. > > On Thu, Feb 8, 2018 at 12:38 AM, Sum J wrote: > > My xml file is located in

How to set/update value in a xml file using requests in python

2018-02-06 Thread Sum J
My xml file is located in local network : http://192.168.43.109/DevMgmt/NetAppsDyn.xml Below is a part content of above xml I want to update : off I want to set value for 'ResourceUI' and 'Port' field in above xml. I have used below code : data = { 'R