-
-
Notifications
You must be signed in to change notification settings - Fork 252
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).
- Bitbucket: https://bitbucket.org/bobf/bpython/issue/228
- Originally Reported By:
- Originally Created At: 2012-10-03T00:09:06.512