<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>arde en el infierno</title>
	<atom:link href="http://www.ardeenelinfierno.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardeenelinfierno.com/wordpress</link>
	<description>mi superpoder es pensar ... lo justo ... pero pensar</description>
	<pubDate>Mon, 16 Jun 2008 18:37:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>BSO para el día de hoy</title>
		<link>http://www.ardeenelinfierno.com/wordpress/2008/06/16/bso-para-el-dia-de-hoy/</link>
		<comments>http://www.ardeenelinfierno.com/wordpress/2008/06/16/bso-para-el-dia-de-hoy/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 18:37:03 +0000</pubDate>
		<dc:creator>arcturus</dc:creator>
		
		<category><![CDATA[Amigos]]></category>

		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.ardeenelinfierno.com/wordpress/?p=87</guid>
		<description><![CDATA[Podría resumir el día de hoy con dos canciones, curiosamente del mismo grupo, y que no paran de sonar en mi cabeza:
Muse - Butterflies and Hurricanes
y
Muse - Invincible
<script type="text/javascript">SHARETHIS.addEntry({ title: "BSO para el día de hoy", url: "http://www.ardeenelinfierno.com/wordpress/2008/06/16/bso-para-el-dia-de-hoy/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Podría resumir el día de hoy con dos canciones, curiosamente del mismo grupo, y que no paran de sonar en mi cabeza:</p>
<p><a title="best_change_the_world" href="http://www.goear.com/listen.php?v=d19c664">Muse - Butterflies and Hurricanes</a></p>
<p>y</p>
<p><a title="together_we_are_invincible" href="http://www.goear.com/listen.php?v=615f469">Muse - Invincible</a></p>
<p><a href="http://sharethis.com/item?&wp=2.5&amp;publisher=&amp;title=BSO+para+el+d%C3%ADa+de+hoy&amp;url=http%3A%2F%2Fwww.ardeenelinfierno.com%2Fwordpress%2F2008%2F06%2F16%2Fbso-para-el-dia-de-hoy%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardeenelinfierno.com/wordpress/2008/06/16/bso-para-el-dia-de-hoy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Limit download (or upload) rate in PyCurl</title>
		<link>http://www.ardeenelinfierno.com/wordpress/2008/04/22/limit-download-or-upload-rate-in-pycurl/</link>
		<comments>http://www.ardeenelinfierno.com/wordpress/2008/04/22/limit-download-or-upload-rate-in-pycurl/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 19:10:04 +0000</pubDate>
		<dc:creator>arcturus</dc:creator>
		
		<category><![CDATA[Tecnología]]></category>

		<category><![CDATA[libcurl]]></category>

		<category><![CDATA[limit]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[pycurl]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.ardeenelinfierno.com/wordpress/?p=86</guid>
		<description><![CDATA[I'm  used to work with curl in other programming languages like php or perl, so pycurl became my first choice in python url access libraries .
Pycurl it's not a native module like urllib2, instead is a wrapper for the C library libcurl, it is not as fancy as native python modules are, but is [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Limit download (or upload) rate in PyCurl", url: "http://www.ardeenelinfierno.com/wordpress/2008/04/22/limit-download-or-upload-rate-in-pycurl/" });</script>]]></description>
			<content:encoded><![CDATA[<p>I'm  used to work with curl in other programming languages like php or perl, so <a title="fetch_it_all" href="http://pycurl.sourceforge.net/" target="_blank">pycurl</a> became <a title="nice_libraries_comparation" href="http://linux.duke.edu/projects/urlgrabber/comparison.ptml">my first choice in python url access libraries</a> .</p>
<p>Pycurl it's not a native module like urllib2, instead is a wrapper for the C library <a title="nice_library" href="http://curl.haxx.se/libcurl/" target="_blank">libcurl</a>, it is not as fancy as native python modules are, but is extremely fast and you have lots of features. Also if you want to find documentation about how to use Pycurl is better to look at libcurl's documentation and examples.</p>
<p>And so I did. In libcurl documentation I found which <a title="options_options_and_more_options" href="http://curl.haxx.se/libcurl/c/curl_easy_setopt.html" target="_blank">options i could set for libcurl API</a> to limit download bandwidth usage, <span class="nroffip">MAX_RECV_SPEED_LARGE</span>. Note that options in Pycurl are the same that in libcurl without the prefix CURLOPT.</p>
<p>Here is a simple example of how to limit download a file with a 10KB limit rate:</p>
<div class="igBar"><a href="javascript:showCodeTxt('python-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">PYTHON:</span>
<div id="python-2">
<div class="python">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">import</span> pycurl</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">c = pycurl.<span style="color: black;">Curl</span><span style="color:#000000; font-weight:bold;">&#40;</span><span style="color:#000000; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">c.<span style="color: black;">setopt</span><span style="color:#000000; font-weight:bold;">&#40;</span>c.<span style="color: black;">URL</span>, <span style="color: #483d8b;">"http://python.org/ftp/python/2.5.2/Python-2.5.2.tgz"</span><span style="color:#000000; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">c.<span style="color: black;">setopt</span><span style="color:#000000; font-weight:bold;">&#40;</span>c.<span style="color: black;">MAX_RECV_SPEED_LARGE</span>, <span style="color:#800000;">10000</span><span style="color:#000000; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">c.<span style="color: black;">setopt</span><span style="color:#000000; font-weight:bold;">&#40;</span>c.<span style="color: black;">WRITEDATA</span>, <span style="color: #008000;">file</span><span style="color:#000000; font-weight:bold;">&#40;</span><span style="color: #483d8b;">"python-2.5.2.tar.gz"</span>,<span style="color: #483d8b;">"w"</span><span style="color:#000000; font-weight:bold;">&#41;</span><span style="color:#000000; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">c.<span style="color: black;">perform</span><span style="color:#000000; font-weight:bold;">&#40;</span><span style="color:#000000; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>And this is my story <img src='http://www.ardeenelinfierno.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a href="http://sharethis.com/item?&wp=2.5&amp;publisher=&amp;title=Limit+download+%28or+upload%29+rate+in+PyCurl&amp;url=http%3A%2F%2Fwww.ardeenelinfierno.com%2Fwordpress%2F2008%2F04%2F22%2Flimit-download-or-upload-rate-in-pycurl%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardeenelinfierno.com/wordpress/2008/04/22/limit-download-or-upload-rate-in-pycurl/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
