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

Ron Adam rrr at ronadam.com
Wed Feb 16 02:08:42 CET 2011



On 02/15/2011 09:18 AM, Nick Coghlan wrote:
> On Tue, Feb 15, 2011 at 10:23 PM, Ronald Oussoren
> <ronaldoussoren at mac.com>  wrote:
>>
>> I don't agree. I'm quite happy with help in its current form.
>
> Indeed, if the default pager isn't suitable for the default terminal
> program, that sounds like something to bring up with the OS developer.
> (I have no problems with the default setup in Kubuntu)
>
> Separating out the string generation from the display process for 3.3.
> may be a reasonable idea, though (similar to the separation of
> dis.code_info() and dis.show_code() in 3.2)

That would be a good first step to any further improvements as well.

I was playing around with this today, and noticed the pager isn't used for 
everything, just for individual object results no matter how short or long.

It's not used with any of the following commands: 'help', 'keywords', 
'topics', 'symbols', or 'modules'.  And if you give 'modules' a key, then 
the synopsis function uses print().

For example, help('modules test') results in a very long list that uses 
print() to output each line.

Some parts of pydoc are designed so you can replace stdin and stdout, but 
others parts still don't seem to work that way.  Does anyone actually use 
that feature?

Cheers,
   Ron




More information about the Python-ideas mailing list