← 返回首页
help() does not use pager on python 3 · Issue #228 · bpython/bpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

help() does not use pager on python 3 #228

New issue
New issue

Description

On python 3.2.3 (and probably on some other python 3 versions) help() in bpython (curses frontend) does not use the pager, it just dumps everything to stdout. This is caused by bpython._internal using "pydoc.Helper(sys.stdin, sys.stdout)". On older pythons this worked fine, on newer pythons this forces actual help output to go straight to stdout instead of using the pager.

A workaround is to pass None instead of sys.stdout (which is the default, so it is probably best to just use "pydoc.Helper()"). On older pythons (including 2.7, did not check older python 2) all access goes through a property that returns sys.stdin/stdout if the value passed was None. On python 3.2.3 there is exactly one spot that bypasses the property, and that uses the pager if it sees None (which is what we want).

Someone should check pydoc.Helper() does the right thing on all older pythons still supported before committing this, though (I do not have older pythons handy).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.