We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pydoc
1 parent 284c52d commit 9dfefbeCopy full SHA for 9dfefbe
Lib/pydoc.py
@@ -1594,9 +1594,10 @@ def plain(text):
1594
def pipepager(text, cmd):
1595
"""Page through text by feeding it to another program."""
1596
import subprocess
1597
- proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
1598
+ errors='backslashreplace')
1599
try:
- with io.TextIOWrapper(proc.stdin, errors='backslashreplace') as pipe:
1600
+ with proc.stdin as pipe:
1601
1602
pipe.write(text)
1603
except KeyboardInterrupt:
0 commit comments