[IPython-User] paging standard output from code executed from the prompt

Fernando Perez fperez.net@gmail....
Tue Feb 22 13:47:43 CST 2011

On Mon, Feb 21, 2011 at 4:37 PM, Deepak Subburam <dsubburam@gmail.com> wrote:
> If I was doing this from the bash prompt, I can simply pipe the output to
> "less":
> For example:
> $ analyse_data.py --load data_file --print_results | less
> Is there a way to do something similar within ipython? This would be
> very useful.

No, I don't think we have anything out of the box for this, but it's a
very valid request.  I think a good implementation would be to extend
%page to support not only paging of objects, but also of a statement
so that you could type

%page -someflag  analysis.results()

and this would execute analysis.results() under a modified printer
that would buffer and page its output rather than going directly to
the screen.

If you take a shot at it we'd be happy to review it, but nobody is
working on such a feature at this time, I'm afraid.


More information about the IPython-User mailing list