curl works fine, except if I call it with subprocess
Question: I have a curl that looks a bit like this:

    
    
    curl -1 -X POST --user "xxx:yyy" -d "status=new&content=issue+details+at%3A+http%3A%2F%2Flocalhost%3A6543%2Ftest%2Fsubmit%2F16-07-03-H-20-18-&kind=bug&title=QA+Fail&responsible=xxx&priority=critical"  "https://api.bitbucket.org/1.0/repositories/my/repo/issues"
    

If I open up a terminal and just execute it it works fine (an issue is created
in bitbucket)

if I try to execute the same curl via subprocess it just fails:

    
    
    sCmd = "curl....etc"
    lCmd = [s for s in sCmd.split() if s]
    subprocess.call(lCmd)
    

I get the error message:

    
    
    curl: (1) Protocol "https not supported or disabled in libcurl
    

I don't get why the exact same command works so differently in Python. Any
ideas?

This is without use of a virtualenv, by the way. And I know for a fact that
the contents of `lCmd` are valid

PS: yes, I know I should be using requests. Unfortunately requests was giving
me similar problems.


Answer: I can't answer your question about using the `curl` command in `subprocess`,
but it might work if you just call `os.system` Like this:

    
    
    import os
    os.system ("curl -1 -X POST --user \"xxx:yyy\" -d \"status=new&content=issue+details+at%3A+http%3A%2F%2Flocalhost%3A6543%2Ftest%2Fsubmit%2F16-07-03-H-20-18-&kind=bug&title=QA+Fail&responsible=xxx&priority=critical\"  \"https://api.bitbucket.org/1.0/repositories/my/repo/issues\"")
    

This most likely works knowing that `curl` runs via the terminal directly.

> This might help with your question about `curl` not running in subprocess
> (probably has something to do with the environment of subprocess being
> different then the environment that `curl` was configured):
> <https://curl.haxx.se/docs/faq.html#curl_1_SSL_is_disabled_https>

