<font color='black' size='2' face='arial'>
<div> <br>
<font size="2"><font face="Arial, Helvetica, sans-serif">grin is a grep-like python utility that can mine files/directories via regexes and output its result colorized by ansi escapes.  If you have it installed you can use it in IPython with the system command escape:<br>
<br>
!grin <regex> <file/directory><br>
<br>
On linux and Mac this probably is enough to get you colored output as those terminals recognize ansi escapes which grin should generate as it has some awareness of that capability.  However, windows doesn't have that capability built in, the pyreadline utility adds it, but it must be told to interpret the ansi escapes.<br>
<br>
Here is how I got colored output on windows:<br>
<br>
from IPython.genutils import Term<br>
<br>
oc = !grin hi "C:\PyDevArea\IPy-repo\0.11DemoFix\docs\examples\lib" --force-color<br>
print >> Term.cout, oc.n<br>
<br>
I'd like to make this simpler, use an alias, custom magic, add a util to handle output expected to be ansi escape colorized?<br>
<br>
Suggestions?<br>
<br>
Tom<br>
</font></font></div>

<div style="clear: both;"></div>
</font>