title: How to execute a curl command in Python and get the response and pass it through other code
body: <p>I have a curl command.  I want to execute in in Python and fetch the response to pass it through other code.</p>
  
  <pre><code>curl https://api.box.com/oauth2/token -d 'grant_type=refresh_token' -d 'refresh_token=Ew38UXVKS3kc0axFt6MdDklUnoHpipxTzDWBmKlXAG9ImvGafbbaUhQndv89e677' -d 'client_id=3qkm5h4wh765b3khiws0z8hdpkc56jhs' -d 'client_secret=h9AeXzZL3KATJuaHmimFFBRBDZQrp9tr' -X POST
  </code></pre>
  
  <p>How can I execute the script in Python and get the response and pass it through other code?</p>
  
  <p>When I am executing the curl script in CMD, I am getting this response:</p>
  
  <pre><code>{"access_token":"uz843jpIiEWnu0CcuT9as2XbA3UEQTR67","expires_in":4261,"restricted_to":[],"refresh_token":"GsDaP6VyUpHN8vDHbz9ktAjLfMLN0dFL6PMIK4fmDH8eKRqR360vDhQTBhIMZxy67","token_type":"bearer"}
  </code></pre>
  
  <p>From the above response I need to take the <code>access_token</code> value.</p>