title: Using subprocess module with curl command
body: <p>I'm getting the error: <strong>function' object is unsubscriptable</strong> when using the subprocess module with curl command.</p>
  
  <pre><code>cmd (subprocess.check_call ['curl -X POST -u "opt:gggguywqydfydwfh" ' + Url + 'job/%s/%s/promotion/' % (job, Num)]).
  </code></pre>
  
  <p>I am calling this using the function.</p>
  
  <pre><code>def cmd(sh):
    proc = subprocess.Popen(sh, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE).
  </code></pre>
  
  <p>Can anyone point out the problem?</p>