Skip to main content

Simple ipython magic that do grep over ipython outputs

Project description

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'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greps-1.0.4.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

greps-1.0.4-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page