<?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: Some more tweaks to my Python script</title>
	<atom:link href="http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/</link>
	<description>Because FLOSS is handy, isn't it?</description>
	<pubDate>Wed, 07 Jan 2009 18:51:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: isilanes</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-148</link>
		<dc:creator>isilanes</dc:creator>
		<pubDate>Thu, 13 Mar 2008 19:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-148</guid>
		<description>@PJ: I just posted the full code of the last version. It is available at my &lt;a href="http://isilanes.org/soft/bhs/bhs.php" rel="nofollow"&gt;home page&lt;/a&gt;, as well as commented in &lt;a href="/2008.03/project-bhs/" rel="nofollow"&gt;a new post&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@PJ: I just posted the full code of the last version. It is available at my <a href="http://isilanes.org/soft/bhs/bhs.php" rel="nofollow">home page</a>, as well as commented in <a href="/2008.03/project-bhs/" rel="nofollow">a new post</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Project BHS &#124; handyfloss</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-147</link>
		<dc:creator>Project BHS &#124; handyfloss</dc:creator>
		<pubDate>Thu, 13 Mar 2008 19:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-147</guid>
		<description>[...] outlined in some previous posts[1,2,3,4], I have been playing around with a piece of Python code to process some log files. The log files [...]</description>
		<content:encoded><![CDATA[<p>[...] outlined in some previous posts[1,2,3,4], I have been playing around with a piece of Python code to process some log files. The log files [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isilanes</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-132</link>
		<dc:creator>isilanes</dc:creator>
		<pubDate>Tue, 26 Feb 2008 19:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-132</guid>
		<description>&lt;i&gt;"How about posting the full text of v11 ?"&lt;/i&gt;

Thanks for pointing out... I will.</description>
		<content:encoded><![CDATA[<p><i>&#8220;How about posting the full text of v11 ?&#8221;</i></p>
<p>Thanks for pointing out&#8230; I will.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PJ</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-131</link>
		<dc:creator>PJ</dc:creator>
		<pubDate>Tue, 26 Feb 2008 19:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-131</guid>
		<description>How about posting the full text of v11 ?</description>
		<content:encoded><![CDATA[<p>How about posting the full text of v11 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-130</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 20 Feb 2008 17:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-130</guid>
		<description>It would have probably been faster if you weren't pre-filtering the lines...

I made a post here http://www.bouncybouncy.net/ramblings/posts/regex_with_named_groups/

explaining what I was trying to say in the comments :)</description>
		<content:encoded><![CDATA[<p>It would have probably been faster if you weren&#8217;t pre-filtering the lines&#8230;</p>
<p>I made a post here <a href="http://www.bouncybouncy.net/ramblings/posts/regex_with_named_groups/" rel="nofollow">http://www.bouncybouncy.net/ramblings/posts/regex_with_named_groups/</a></p>
<p>explaining what I was trying to say in the comments :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isilanes</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-129</link>
		<dc:creator>isilanes</dc:creator>
		<pubDate>Wed, 20 Feb 2008 14:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-129</guid>
		<description>&lt;b&gt;@Justin&lt;/b&gt;(3): I just tried your first suggestion, and it seems to be a bit slower, not faster (Probably for the reasons I give in (5) ).</description>
		<content:encoded><![CDATA[<p><b>@Justin</b>(3): I just tried your first suggestion, and it seems to be a bit slower, not faster (Probably for the reasons I give in (5) ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isilanes</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-128</link>
		<dc:creator>isilanes</dc:creator>
		<pubDate>Wed, 20 Feb 2008 13:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-128</guid>
		<description>&lt;b&gt;@Justin&lt;/b&gt;(3): I will try your first suggestion, but it is not guaranteed that it saves time. In Version 9 maybe it could, but probably not in Version 10+. Right now it is testing a boolean 100% of the times, plus re.search an additional 50% of the times. What you propose is to remove one of the two tests (the boolean), and do the re.search the 100% of the times. If re.search and boolean are equally fast, your solution is a brilliant way of speeding things up by a 50% (to 100%, down from 150%). But the question is whether 2 boolean tests are slower than one re.search. Empiric tests will tell...

The second suggestion, I need time to digest the RE :^)

&lt;b&gt;@all&lt;/b&gt;: I am learning a lot from your comments, folks. Thanks!</description>
		<content:encoded><![CDATA[<p><b>@Justin</b>(3): I will try your first suggestion, but it is not guaranteed that it saves time. In Version 9 maybe it could, but probably not in Version 10+. Right now it is testing a boolean 100% of the times, plus re.search an additional 50% of the times. What you propose is to remove one of the two tests (the boolean), and do the re.search the 100% of the times. If re.search and boolean are equally fast, your solution is a brilliant way of speeding things up by a 50% (to 100%, down from 150%). But the question is whether 2 boolean tests are slower than one re.search. Empiric tests will tell&#8230;</p>
<p>The second suggestion, I need time to digest the RE :^)</p>
<p><b>@all</b>: I am learning a lot from your comments, folks. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-127</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 20 Feb 2008 13:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-127</guid>
		<description>grr, it ate the comment again :(</description>
		<content:encoded><![CDATA[<p>grr, it ate the comment again :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-126</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 20 Feb 2008 13:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-126</guid>
		<description>try:
&lt;code&gt;
cre    = search_cre(line)
if cre:
    credit = float(cre.group(1))
&lt;/code&gt;

The other thing I talked about, you can do
cpattern    = r'total_credit&#62;(?P&#60;cre&#62;[^&#60;]+)(?P&#60;os&#62;[^&#60;]+)&#60;'

pattern = "(%s)&#124;(%s)" % (cpattern, opattern)

and then just match on that, and use groupdict()</description>
		<content:encoded><![CDATA[<p>try:<br />
<code><br />
cre    = search_cre(line)<br />
if cre:<br />
    credit = float(cre.group(1))<br />
</code></p>
<p>The other thing I talked about, you can do<br />
cpattern    = r&#8217;total_credit&gt;(?P&lt;cre&gt;[^&lt;]+)(?P&lt;os&gt;[^&lt;]+)&lt;&#8217;</p>
<p>pattern = &#8220;(%s)|(%s)&#8221; % (cpattern, opattern)</p>
<p>and then just match on that, and use groupdict()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isilanes</title>
		<link>http://handyfloss.net/2008.02/some-more-tweaks-to-my-python-script/comment-page-1/#comment-125</link>
		<dc:creator>isilanes</dc:creator>
		<pubDate>Wed, 20 Feb 2008 09:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://handyfloss.net/?p=299#comment-125</guid>
		<description>Point taken!</description>
		<content:encoded><![CDATA[<p>Point taken!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
