How to redirect curl command response to a file in python script using subprocess module

Published: 5/10/2017
How to redirect curl command response to a file in python script using subprocess module
Source: STACKOVERFLOW.COM

**>>>from subprocess import * data = ["curl","-k","-u",raw_input("UserId"), raw_input("Artifact Server link:")+"/artifactory/api/storageinfo"] call(data)** this code will execute the curl and the output is displayed on terminal or command prompt instead i need output in file. How to redirect curl output to a file in python script.

Read more
Related news
Comment