osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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