Why this curl command works in shell but NOT when I do subprocess.getoutput(["curl", .....]) ??

Christian Seberino cseberino at gmail.com
Sat Feb 16 15:22:31 EST 2019


Why this curl command works in shell but NOT when I use subprocess as in below?.....


UL_URL     = "https://auphonic.com/api/simple/productions.json"

ul_output = subprocess.getoutput(["curl",
                                  "-X",
                                  "POST",
                                  UL_URL,
                                  "-u",
                                  "seberino:XXXXXXX",
                                  "-F",
                                  "input_file=@" + sys.argv[1],
                                  "-F",
                                  "denoise=true",
                                  "-F",
                                  "action=start"])

There is some difference in how shell versus Python process the info.

Thanks,

cs


More information about the Python-list mailing list