linux - How to use curl command with parameters and executing the command from Python script(Python 2.6.6)) -


i writing python script automate works.

i need execute curl command python script , redirect returned json output file can parse file using python script.

also, need pass variables in curl command.

my curl command looks like

curl -k -u <$username:&password> -x "https://xxxxxx:0000/rest/$jobtype/$id"  > jsonoutput.json 

fyi, using python 2.6.6 version

any suggestion appreciated

thanks, jee

better, if use requests library. easy make http requests using module , also, don't need save output in different file. lot of io saved.


Comments