Skip to content

Simple IPython magic that does grep over IPython outputs

License

Notifications You must be signed in to change notification settings

royreznik/greps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

greps

Tests GitHub License codecov PyPI - Python Version Code style

greps is a super simple ipython magic that allow you to use grep over IPython output.

installation

pip install greps

manually loading:

# Inside an IPython shell
%load_ext greps

Automatic loading:

echo "c.InteractiveShellApp.extensions = ['greps']" > ~/.ipython/profile_default/ipython_config.py

Usage

On previous output:

In [1]: {i:i for i in range(3)}
Out[1]: 
{0: 0,
 1: 1,
 2: 2,
}
 
In [2]: %greps 1
Out[2]: ' 1: 1,\n'

On specific output line:

In [1]: 1
Out[1]: 1

In [2]: 2
Out[2]: 2

In [3]: 3
Out[3]: 3

In [4]: 4
Out[4]: 4

In [5]: %greps -l 2 2
Out[5]: '2\n'

About

Simple IPython magic that does grep over IPython outputs

Resources

License

Stars

Watchers

Forks

Packages

No packages published