[Python-ideas] Cleaner separation of help() and interactive help.

Ron Adam rrr at ronadam.com
Tue Feb 8 05:05:34 CET 2011

On 02/07/2011 06:36 PM, Terry Reedy wrote:
> On 2/7/2011 3:21 PM, Ron Adam wrote:
>> It also can be annoying (to me) when I use help and the result is
>> cleared after the pager is done with it. That requires me to re-do the
>> same help requests to recheck details rather than simply scroll back in
>> the current console window.
> ?? On windows, both the command prompt and IDLE shell windows keep the help
> text. I scroll up and down all the time. Multi-screen text would be pretty
> useless otherwise. I consider any other behavior buggy.

I'm using Ubuntu now... I use to (and occasionally switch to) windows, 
which is why it may be annoying for me now.  It doesn't act the same.  I 
think it may be different still on Macs.

I like the how the pager uses the arrow and page up keys on linux systems, 
but don't always want that. So I do want to keep it and make it available 
for use in other projects.  I also want to simplify how help works and this 
was one thing that would do that.  But there seems to be some some support 
for the current behaviour.

> Indeed, interposing the pager is a nuisance as it requires multiple returns
> before one can get the full text for scrolling.

Yes, I've run across that before also.

> By whatever means, IDLE
> does not visibly page but gives the whole text at once. None is still the
> return object.

I'm not sure if idle is doing anything other than just getting what is sent 
to stdout.  The pager selection and control is complex enough that it is 
hard to tell just what is happening and how.

> help(ob) returning a string is a different issue. Since the text is ofter
> more than ob.__doc__ (see help(int) versus int.__doc__, for instance),
> returning the composed text would at minimum make it easier to test help,
> or to check the composed result for a particular module or class. One might
> even use the result as a quick ref manual, or a first draft for one.

The complete text (as a string) for each request is sent to the pager all 
at once.  So the content isn't an issue.  The only thing that might be an 
issue is the bold mark ups.  Which I do like.  :-/


More information about the Python-ideas mailing list