Important

This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.

If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).

Module: core.page

Paging capabilities for IPython.core

Notes

For now this uses IPython hooks, so it can’t be in IPython.utils. If we can get rid of that dependency, we could move it there. —–

9 Functions

IPython.core.page.display_page(strng, start=0, screen_lines=25)

Just display, no paging. screen_lines is ignored.

IPython.core.page.as_hook(page_func)

Wrap a pager func to strip the self arg

so it can be called as a hook.

IPython.core.page.page_dumb(strng, start=0, screen_lines=25)

Very dumb ‘pager’ in Python, for when nothing else works.

Only moves forward, same interface as page(), except for pager_cmd and mode.

IPython.core.page.pager_page(strng, start=0, screen_lines=0, pager_cmd=None)
IPython.core.page.page(data, start=0, screen_lines=0, pager_cmd=None)

Display content in a pager, piping through a pager after a certain length.

data can be a mime-bundle dict, supplying multiple representations, keyed by mime-type, or text.

Pager is dispatched via the show_in_pager IPython hook. If no hook is registered, pager_page will be used.

IPython.core.page.page_file(fname, start=0, pager_cmd=None)

Page a file, using an optional pager command and starting line.

IPython.core.page.get_pager_cmd(pager_cmd=None)

Return a pager command.

Makes some attempts at finding an OS-correct one.

IPython.core.page.get_pager_start(pager, start)

Return the string for paging files with an offset.

This is the ‘+N’ argument which less and more (under Unix) accept.

IPython.core.page.page_more()