Skip to content

IDLE: Show help(object) output in a text viewer #81949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
taleinat opened this issue Aug 5, 2019 · 5 comments
Open

IDLE: Show help(object) output in a text viewer #81949

taleinat opened this issue Aug 5, 2019 · 5 comments
Assignees
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@taleinat
Copy link
Contributor

taleinat commented Aug 5, 2019

BPO 37768
Nosy @rhettinger, @terryjreedy, @taleinat
PRs
  • gh-81949: IDLE: show help(object) output in a text viewing window #15140
  • IDLE: make the config dialog vertically resizable #26561
  • 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 = None
    created_at = <Date 2019-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 = <Date 2021-06-06.15:28:24.396>
    user = 'https://github.com/taleinat'

    bugs.python.org fields:

    activity = <Date 2021-06-06.15:28:24.396>
    actor = 'taleinat'
    assignee = 'taleinat'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2019-08-05.20:56:06.543>
    creator = 'taleinat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37768
    keywords = ['patch']
    message_count = 5.0
    messages = ['349073', '349075', '349076', '351059', '351065']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'terry.reedy', 'taleinat']
    pr_nums = ['15140', '26561']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37768'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @taleinat
    Copy link
    Contributor Author

    taleinat commented 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 taleinat added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes labels Aug 5, 2019
    @taleinat taleinat self-assigned this Aug 5, 2019
    @taleinat taleinat added topic-IDLE type-feature A feature request or enhancement labels Aug 5, 2019
    @taleinat
    Copy link
    Contributor Author

    taleinat commented Aug 5, 2019

    See PR #59345.

    @taleinat
    Copy link
    Contributor Author

    taleinat commented Aug 5, 2019

    Raymond, I'm interested in your opinion on this.

    @terryjreedy
    Copy link
    Member

    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.

    @terryjreedy
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @erlend-aasland erlend-aasland moved this to In Progress in IDLE Issues Jul 27, 2022
    @hugovk hugovk added 3.11 only security fixes 3.12 only security fixes and removed 3.9 only security fixes 3.8 (EOL) end of life 3.7 (EOL) end of life labels Apr 8, 2023
    @erlend-aasland erlend-aasland added the 3.13 bugs and security fixes label Jan 5, 2024
    @terryjreedy terryjreedy removed 3.11 only security fixes 3.12 only security fixes 3.13 bugs and security fixes labels Aug 6, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: In Progress
    Development

    No branches or pull requests

    4 participants