|
<div class="highlight"><pre><span></span><span class="o">>>></span> <span class="c1"># using urllib2:</span>
|
|
<span class="o">>>></span> <span class="kn">import</span> <span class="nn">urllib2</span>
|
|
<span class="o">>>></span> <span class="n">urllib2</span><span class="o">.</span><span class="n">urlopen</span><span class="p">(</span><span class="s2">"{{ ping_url }}"</span><span class="p">)</span>
|
|
|
|
<span class="o">>>></span> <span class="c1"># using requests:</span>
|
|
<span class="o">>>></span> <span class="kn">import</span> <span class="nn">requests</span>
|
|
<span class="o">>>></span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"{{ ping_url }}"</span><span class="p">)</span>
|
|
</pre></div>
|