[IPython-dev] A plug for grin

Robert Kern robert.kern at gmail.com
Wed Aug 19 19:39:29 EDT 2009

[disclaimer: I wrote grin.]

Given Brian's current refactoring work, I would like to point out that my 
grep-alike tool, grin, has an example script that goes with it called 
grinimports which search normalized import statements in Python code. It might 
help people migrate their code to the new layout.


grinimports.py is in examples/.

For example, in my partially fixed ~/.ipython/:

[.ipython]$ grinimports.py ipapi
     1 : import IPython.ipapi
     2 : from IPython import ipapi
     1 : from IPython import ipapi
     2 : import IPython.core.ipapi
     1 : import IPython.ipapi
     1 : from IPython.core.ipapi import TryNext
     2 : from IPython.core.ipapi import get as ipget

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the IPython-dev mailing list