How do I run a curl command in python
<p>This is the command I am running in <code>bash</code>:</p>

<pre><code>curl -d "username=xxxxxx" -d "password=xxxxx" &lt;&lt;address&gt;&gt; --insecure --silent
</code></pre>

<p>How can I run this using Python?</p>

<p>Try <code>Subprocess</code>:</p>

<pre><code>import subprocess
# ...

subprocess.call(["curl -d \"username=xxxxxx\" -d \"password=xxxxx\" https://xxxxx.com/logreg/login/ --insecure --silent" , shell=True)
</code></pre>

<p>I did not try what I wrote, but the essential is here.</p>

<p>Check this page for more info : <a href="https://docs.python.org/2/library/subprocess.html" rel="nofollow">Subprocess management</a></p>

python curl