Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06628e1

Browse files
committed
Pass "None" as output argument to pydoc.Helper in Python 2.6+.
Otherwise, pydoc bypasses the pager in Python 3. Fixes issue#228.
1 parent23e07c4 commit06628e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎bpython/_internal.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
class_Helper(object):
1111

1212
def__init__(self):
13-
self.helper=pydoc.Helper(sys.stdin,sys.stdout)
13+
ifhasattr(pydoc.Helper,"output"):
14+
# See issue #228
15+
self.helper=pydoc.Helper(sys.stdin,None)
16+
else:
17+
self.helper=pydoc.Helper(sys.stdin,sys.stdout)
1418

1519
def__repr__(self):
1620
return ("Type help() for interactive help, "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp