[IPython-user] better way to view help info in ipython?

belinda thom bthom at cs.hmc.edu
Sun Dec 31 00:47:25 CST 2006


Hi,

Is there a way to force the data-pager output from less to stay  
inside of python's interactive buffer after the pager's been quit?  
I've tried setting and unsetting PAGER and LESS as recommended in the  
manual. Either way, running something like:

   In [8]: help(S.random.multinomial)

behaves throws me into a more-or-less type of program, and when I  
quit, the display disappears.

I'm on Mac OS X 10.4.8 using ipython 0.7.3.

FWIW, in this case,

   In [9]: S.random.multinomial?

keeps the info in the buffer, e.g.:

   Type:           builtin_function_or_method
   Base Class:     <type 'builtin_function_or_method'>
   String Form:    <built-in method multinomial of mtrand.RandomState  
object at 0x13fb6b0>
   Namespace:      Interactive
   Docstring:
     Multinomial distribution.

     multinomial(n, pvals, size=None) -> random values

     pvals is a sequence of probabilities that should sum to 1  
(however, the
     last element is always assumed to account for the remaining  
probability
     as long as sum(pvals[:-1]) <= 1).

but sometimes I'd like the same behavior on something that takes up  
more than one "page" of the ipython program's screen.


More information about the IPython-user mailing list