You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE: Show help(object) output in a text viewer #81949
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/taleinat'closed_at=Nonecreated_at=<Date2019-08-05.20:56:06.543>labels= ['3.8', 'expert-IDLE', 'type-feature', '3.7', '3.9']
title='IDLE: Show help(object) output in a text viewer'updated_at=<Date2021-06-06.15:28:24.396>user='https://github.com/taleinat'
Currently, IDLE just writes the entire help message into the shell.
If auto-squeezing is enabled, then long help messages are automatically squeezed, following which the help text can be viewed in a text viewer or expanded inline. This is still not great UX.
I propose to simply have help(object) open a text viewer with the help text. There's actually an old (2007) comment in Lib\idlelib\pyshell.py by KBK that this should be done.
For myself, I only want this for 'large' outputs. I prefer something like the following left alone.
>>> help('continue')
The "continue" statement
************************
continue_stmt ::= "continue"
"continue" may only occur syntactically nested in a "for" or "while"
loop, but not nested in a function or class definition within that
loop. It continues with the next cycle of the nearest enclosing loop.
When "continue" passes control out of a "try" statement with a
"finally" clause, that "finally" clause is executed before really
starting the next loop cycle.
Related help topics: while, for
The threshhold for squeezer should be good enough. I think of this as autosqueeze + autoexpand if this if the first output after '>>>' and the statement began with 'help('. An advantage of doing it this way is that the squeezer button remains after dismissing the viewer.
Also, I suspect that most people who disable squeezer would not like this either.
Activity
taleinat commentedon Aug 5, 2019
Currently, IDLE just writes the entire help message into the shell.
If auto-squeezing is enabled, then long help messages are automatically squeezed, following which the help text can be viewed in a text viewer or expanded inline. This is still not great UX.
I propose to simply have help(object) open a text viewer with the help text. There's actually an old (2007) comment in Lib\idlelib\pyshell.py by KBK that this should be done.
See related discussion in issue bpo-35855.
taleinat commentedon Aug 5, 2019
See PR #59345.
taleinat commentedon Aug 5, 2019
Raymond, I'm interested in your opinion on this.
terryjreedy commentedon Sep 3, 2019
For myself, I only want this for 'large' outputs. I prefer something like the following left alone.
continue_stmt ::= "continue"
"continue" may only occur syntactically nested in a "for" or "while"
loop, but not nested in a function or class definition within that
loop. It continues with the next cycle of the nearest enclosing loop.
When "continue" passes control out of a "try" statement with a
"finally" clause, that "finally" clause is executed before really
starting the next loop cycle.
Related help topics: while, for
The threshhold for squeezer should be good enough. I think of this as autosqueeze + autoexpand if this if the first output after '>>>' and the statement began with 'help('. An advantage of doing it this way is that the squeezer button remains after dismissing the viewer.
Also, I suspect that most people who disable squeezer would not like this either.
terryjreedy commentedon Sep 3, 2019
I should have said, 'who disable autosqueeze'. Anyway, an option to disable help autoview will make me more comfortable adding it.
A similar change would be to add 'Squeeze & View' to the context menu.