[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.

   http://pypi.python.org/pypi/grin

grinimports.py is in examples/.

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

[.ipython]$ grinimports.py ipapi
./home_ipy_user_conf.py:
     1 : import IPython.ipapi
./ipy_profile_mydoctest.py:
     2 : from IPython import ipapi
./ipy_profile_sh.py:
     1 : from IPython import ipapi
./ipy_user_conf.py:
     2 : import IPython.core.ipapi
./my_completers.py:
     1 : import IPython.ipapi
./my_ipy_traits_completer.py:
     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