I do a lookup on internet using CURL. I automated this using a python script to take an IP as an argument and further run CURL using that.
I tried the following:
maxm = os.system('curl -u "Username : Password " %s' %url)
But still the output gets displayed on terminal and not as value for variable maxm
.
I even tried subprocess.Popen
. But that dint work though.
Seeking help to resolve this.
Regards Richa
You could use
subprocess.PIPE
, but the easiest way is to usesubprocess.check_output