<?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: grin 1.1</title>
	<atom:link href="http://blog.enthought.com/python/grin-11/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.enthought.com/python/grin-11/</link>
	<description>The latest from us to the open-source projects and communities we love.</description>
	<lastBuildDate>Mon, 29 Aug 2011 21:39:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-2549</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 12 Jun 2009 16:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-2549</guid>
		<description>Thanks for writing grin, I really like it.

About ack:  Its defaults suck.  It skips files whose types it doesn&#039;t understand.  I&#039;m sure you can reconfigure this, but why worry about re-configuring it correctly on every machine I use, when I can just &quot;easy_install grin&quot; and have it work sanely by default?

Also, a small feature request: grep&#039;s -w option.  I think you could basically just tack \b onto the beginning and end of the specified regex and it&#039;d work like -w.  It&#039;s an option I find really useful</description>
		<content:encoded><![CDATA[<p>Thanks for writing grin, I really like it.</p>
<p>About ack:  Its defaults suck.  It skips files whose types it doesn&#8217;t understand.  I&#8217;m sure you can reconfigure this, but why worry about re-configuring it correctly on every machine I use, when I can just &#8220;easy_install grin&#8221; and have it work sanely by default?</p>
<p>Also, a small feature request: grep&#8217;s -w option.  I think you could basically just tack \b onto the beginning and end of the specified regex and it&#8217;d work like -w.  It&#8217;s an option I find really useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rkern</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-47</link>
		<dc:creator>rkern</dc:creator>
		<pubDate>Thu, 17 Jul 2008 01:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-47</guid>
		<description>raja: I had some Python 2.5 syntax in there. This is fixed in SVN and will be pushed as 1.1.1 next week (I&#039;m waiting for more bug reports). In the meantime, &#039;easy_install -U &quot;grin==dev&quot;&#039; or grab it from SVN at the URL given above.

William: How do I exclude more than one directory name? Like both &quot;build&quot; and &quot;.svn&quot;? As far as I can tell, the glob syntax used there does not allow {.svn,build}.</description>
		<content:encoded><![CDATA[<p>raja: I had some Python 2.5 syntax in there. This is fixed in SVN and will be pushed as 1.1.1 next week (I&#8217;m waiting for more bug reports). In the meantime, &#8216;easy_install -U &#8220;grin==dev&#8221;&#8216; or grab it from SVN at the URL given above.</p>
<p>William: How do I exclude more than one directory name? Like both &#8220;build&#8221; and &#8220;.svn&#8221;? As far as I can tell, the glob syntax used there does not allow {.svn,build}.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Stearns</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-45</link>
		<dc:creator>William Stearns</dc:creator>
		<pubDate>Tue, 15 Jul 2008 11:18:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-45</guid>
		<description>@rkern So let&#039;s say you have a handy dandy project and you want to see which python files you&#039;ve imported datetime.  It has several directories deep and it&#039;s svn controlled.  You don&#039;t want to match anything in the .svn directories.

&lt;code&gt;
grep -R &quot;import datetime&quot; *.py --exclude=*.svn* --color
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@rkern So let&#8217;s say you have a handy dandy project and you want to see which python files you&#8217;ve imported datetime.  It has several directories deep and it&#8217;s svn controlled.  You don&#8217;t want to match anything in the .svn directories.</p>
<p><code><br />
grep -R "import datetime" *.py --exclude=*.svn* --color<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raja</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-44</link>
		<dc:creator>raja</dc:creator>
		<pubDate>Tue, 15 Jul 2008 05:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-44</guid>
		<description>Hi,
Tried to use after installing via &quot;easy_install grin&quot;.
I am getting following error.
using python 2.5.1

regards,
raja
------------------------------------------------------

Traceback (most recent call last):
  File &quot;d:\python24\Scripts\grin-script.py&quot;, line 7, in ?
    sys.exit(
  File &quot;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p
y&quot;, line 236, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File &quot;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p
y&quot;, line 2097, in load_entry_point
    return ep.load()
  File &quot;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p
y&quot;, line 1830, in load
    entry = __import__(self.module_name, globals(),globals(), [&#039;__name__&#039;])
  File &quot;d:\python24\lib\site-packages\grin-1.1-py2.4.egg\grin.py&quot;, line 423
    finally:
          ^
SyntaxError: invalid syntax</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Tried to use after installing via &#8220;easy_install grin&#8221;.<br />
I am getting following error.<br />
using python 2.5.1</p>
<p>regards,<br />
raja<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Traceback (most recent call last):<br />
  File &#8220;d:\python24\Scripts\grin-script.py&#8221;, line 7, in ?<br />
    sys.exit(<br />
  File &#8220;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p<br />
y&#8221;, line 236, in load_entry_point<br />
    return get_distribution(dist).load_entry_point(group, name)<br />
  File &#8220;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p<br />
y&#8221;, line 2097, in load_entry_point<br />
    return ep.load()<br />
  File &#8220;d:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\pkg_resources.p<br />
y&#8221;, line 1830, in load<br />
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])<br />
  File &#8220;d:\python24\lib\site-packages\grin-1.1-py2.4.egg\grin.py&#8221;, line 423<br />
    finally:<br />
          ^<br />
SyntaxError: invalid syntax</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rkern</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-43</link>
		<dc:creator>rkern</dc:creator>
		<pubDate>Tue, 15 Jul 2008 02:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-43</guid>
		<description>On ack: yup, I used to use ack for this purpose. I got used to -C context lines, though, and at the time I wrote grin, at least, this feature was unimplemented. Being a Python programmer, I thought it would be more fun to write a new tool instead of hacking my way through Perl. The context handling code is not the most straightforward, and I shudder to think about what I would have to do in Perl to get it right.

Uwe: typo in grin.py. I updated the version in setup.py but not in the file itself.

William: I don&#039;t see where grep skips the directories I want to skip. Variations on &quot;--exclude=.svn&quot; certainly don&#039;t seem to accomplish it. Can you give me an example?</description>
		<content:encoded><![CDATA[<p>On ack: yup, I used to use ack for this purpose. I got used to -C context lines, though, and at the time I wrote grin, at least, this feature was unimplemented. Being a Python programmer, I thought it would be more fun to write a new tool instead of hacking my way through Perl. The context handling code is not the most straightforward, and I shudder to think about what I would have to do in Perl to get it right.</p>
<p>Uwe: typo in grin.py. I updated the version in setup.py but not in the file itself.</p>
<p>William: I don&#8217;t see where grep skips the directories I want to skip. Variations on &#8220;&#8211;exclude=.svn&#8221; certainly don&#8217;t seem to accomplish it. Can you give me an example?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: troelskn</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-42</link>
		<dc:creator>troelskn</dc:creator>
		<pubDate>Mon, 14 Jul 2008 21:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-42</guid>
		<description>I&#039;m sure it was fun to write, but a few lines worth of shell scripting, to stitch find + grep together, would give you the same thing. In fact, I already did that, so here you go, just in case:

$ cat ~/bin/findgrep
&lt;code&gt;
#!/bin/bash
FILETYPE=&quot;*.php&quot;
MODE=&quot;match&quot;
GREPCOLOR=&quot;--color=auto&quot;
OPTS=&quot;Ei&quot;

print_usage()
{
    printf &quot;Usage: %s: [OPTIONS] pattern\n&quot; $(basename $0) &gt;&amp;2
		echo
		echo &quot;-f PATTERN Search in files with filename = PATTERN (default to $FILETYPE)&quot;
		echo &quot;-l print only names of files containing matches&quot;
		echo &quot;-c use markers to highlight the matching strings (default)&quot;
		echo &quot;-C do NOT highlight matching strings&quot;
		echo &quot;-i Run grep pattern case-insensitive (default)&quot;
		echo &quot;-I Run grep pattern case-sensitive&quot;
		exit 2
}

while getopts &#039;f:lCciI&#039; OPTION
do
    case $OPTION in
        f) FILETYPE=&quot;*.$OPTARG&quot;
        ;;
				l) MODE=&quot;filename&quot;
				;;
				c)
				;;
				C) GREPCOLOR=&quot;&quot;
				;;
				i)
				;;
				I)
				OPTS=&quot;E&quot;
				;;
				?) print_usage 
        ;;
    esac
done

shift $(($OPTIND - 1))
if [ $# -ne 1 ]
then
	print_usage
fi

case $MODE in
	match)
	OPTS=&quot;nH$OPTS&quot;
	;;
	filename)
	OPTS=&quot;lH$OPTS&quot;
	;;
	?)
	print_usage
	;;
esac

find . -type f -name &quot;$FILETYPE&quot; -print0 &#124; xargs -0 grep -$OPTS $GREPCOLOR &quot;$1&quot;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;m sure it was fun to write, but a few lines worth of shell scripting, to stitch find + grep together, would give you the same thing. In fact, I already did that, so here you go, just in case:</p>
<p>$ cat ~/bin/findgrep<br />
<code><br />
#!/bin/bash<br />
FILETYPE="*.php"<br />
MODE="match"<br />
GREPCOLOR="--color=auto"<br />
OPTS="Ei"</p>
<p>print_usage()<br />
{<br />
    printf "Usage: %s: [OPTIONS] pattern\n" $(basename $0) &gt;&amp;2<br />
		echo<br />
		echo "-f PATTERN Search in files with filename = PATTERN (default to $FILETYPE)"<br />
		echo "-l print only names of files containing matches"<br />
		echo "-c use markers to highlight the matching strings (default)"<br />
		echo "-C do NOT highlight matching strings"<br />
		echo "-i Run grep pattern case-insensitive (default)"<br />
		echo "-I Run grep pattern case-sensitive"<br />
		exit 2<br />
}</p>
<p>while getopts 'f:lCciI' OPTION<br />
do<br />
    case $OPTION in<br />
        f) FILETYPE="*.$OPTARG"<br />
        ;;<br />
				l) MODE="filename"<br />
				;;<br />
				c)<br />
				;;<br />
				C) GREPCOLOR=""<br />
				;;<br />
				i)<br />
				;;<br />
				I)<br />
				OPTS="E"<br />
				;;<br />
				?) print_usage<br />
        ;;<br />
    esac<br />
done</p>
<p>shift $(($OPTIND - 1))<br />
if [ $# -ne 1 ]<br />
then<br />
	print_usage<br />
fi</p>
<p>case $MODE in<br />
	match)<br />
	OPTS="nH$OPTS"<br />
	;;<br />
	filename)<br />
	OPTS="lH$OPTS"<br />
	;;<br />
	?)<br />
	print_usage<br />
	;;<br />
esac</p>
<p>find . -type f -name "$FILETYPE" -print0 | xargs -0 grep -$OPTS $GREPCOLOR "$1"<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregory Matous</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-41</link>
		<dc:creator>Gregory Matous</dc:creator>
		<pubDate>Mon, 14 Jul 2008 21:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-41</guid>
		<description>&lt;i&gt; grep does the same thing.
ack does the same thing. &lt;/i&gt;

Windows search does the same thing. Just install Vista and you get search out-of-the-box!

Its open source, too. If you have a hex editor. 

But some of us wanted an extensible python solution.</description>
		<content:encoded><![CDATA[<p><i> grep does the same thing.<br />
ack does the same thing. </i></p>
<p>Windows search does the same thing. Just install Vista and you get search out-of-the-box!</p>
<p>Its open source, too. If you have a hex editor. </p>
<p>But some of us wanted an extensible python solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregory Matous</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-39</link>
		<dc:creator>Gregory Matous</dc:creator>
		<pubDate>Mon, 14 Jul 2008 20:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-39</guid>
		<description>Grin is Great.

I&#039;ve had to write this sort of thing in both perl and python. (and even java). 

Reading man pages for find, grep, and xargs got old pretty fast. 

and don&#039;t get me started on windows find.</description>
		<content:encoded><![CDATA[<p>Grin is Great.</p>
<p>I&#8217;ve had to write this sort of thing in both perl and python. (and even java). </p>
<p>Reading man pages for find, grep, and xargs got old pretty fast. </p>
<p>and don&#8217;t get me started on windows find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Jorgensen</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-38</link>
		<dc:creator>Greg Jorgensen</dc:creator>
		<pubDate>Mon, 14 Jul 2008 20:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-38</guid>
		<description>I use ack, sounds like grin is pretty similar:

http://petdance.com/ack/</description>
		<content:encoded><![CDATA[<p>I use ack, sounds like grin is pretty similar:</p>
<p><a href="http://petdance.com/ack/" rel="nofollow">http://petdance.com/ack/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dreivire</title>
		<link>http://blog.enthought.com/python/grin-11/comment-page-1/#comment-37</link>
		<dc:creator>dreivire</dc:creator>
		<pubDate>Mon, 14 Jul 2008 20:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enthought.com/?p=45#comment-37</guid>
		<description>very nice!</description>
		<content:encoded><![CDATA[<p>very nice!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

