[IPython-user] pager to stdout

Fernando Perez fperez.net at gmail.com
Tue Jan 2 14:12:38 CST 2007

On 1/2/07, John Hunter <jdhunter at ace.bsd.uchicago.edu> wrote:
> >>>>> "Ville" == Ville M Vainio <vivainio at gmail.com> writes:
>     Ville> On 1/2/07, John Hunter <jdhunter at ace.bsd.uchicago.edu>
>     Ville> wrote:
>     >> Oh my god, I'm a genius!
>     >>
>     >> > env PAGER=cat ipython -pylab
>     Ville> Still, implementing _ip.options.pager option variable (that
>     Ville> takes a callable), or a hook wouldn't probably be too bad
>     Ville> an idea...
> Having it configurable at runtime would be nice.  The use case is that
> I wanted to post an interactive session, and the output from
> help(someobj) was being caught by the PAGER and disappearing when I
> hit 'q'.  Sure I can 'print someobj.__doc__'but I am trying to
> emphasize the interactive session and what the user would see in
> normal use...

Also note that if you set PAGER to 'less -X', it will NOT clear the
screen after exiting.  So you get the convenience of a real pager
(scrolling and search) while retaining on-screen information after

This little trick was courtesy of Prabhu just a few days ago, I didn't
know about it but I've now changed my setup to use it, since I think
it's very nice.



More information about the IPython-user mailing list