<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Handy Python Progress for JSON module</title>
	<atom:link href="http://blog.schmichael.com/2009/04/26/handy-python-progress-for-json-module/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.schmichael.com/2009/04/26/handy-python-progress-for-json-module/</link>
	<description>good good study, day day up</description>
	<lastBuildDate>Wed, 01 Sep 2010 23:30:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Michael Schurter</title>
		<link>http://blog.schmichael.com/2009/04/26/handy-python-progress-for-json-module/comment-page-1/#comment-46494</link>
		<dc:creator>Michael Schurter</dc:creator>
		<pubDate>Mon, 27 Apr 2009 07:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://michael.susens-schurter.com/blog/?p=642#comment-46494</guid>
		<description>@Paddy3118: Good call!  (no pun intended)  I went ahead and corrected the formatting because WordPress kills formatting in comments, but lets admins correct it evidently.</description>
		<content:encoded><![CDATA[<p>@Paddy3118: Good call!  (no pun intended)  I went ahead and corrected the formatting because WordPress kills formatting in comments, but lets admins correct it evidently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://blog.schmichael.com/2009/04/26/handy-python-progress-for-json-module/comment-page-1/#comment-46488</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Mon, 27 Apr 2009 04:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://michael.susens-schurter.com/blog/?p=642#comment-46488</guid>
		<description>In progress prints, i find it handy to just print every n&#039;th time through the loop. Something like:

&lt;pre lang=&quot;python&quot;&gt;
    def __call__(self, obj):
        self.count += 1
        if (self.count % 100) == 0:
                sys.stdout.write(&quot;\r%8d&quot; % self.count)
        return obj
&lt;/pre&gt;

- Paddy.</description>
		<content:encoded><![CDATA[<p>In progress prints, i find it handy to just print every n&#8217;th time through the loop. Something like:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__call__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, obj<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">count</span> += <span style="color: #ff4500;">1</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">count</span> <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">100</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">0</span>:
                <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>%8d&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">self</span>.<span style="color: black;">count</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> obj</pre></div></div>

<p>- Paddy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
