summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2005-11-05 04:49:18 +0000
committerKa-Ping Yee <ping@zesty.ca>2005-11-05 04:49:18 +0000
commit4c809b14780e47b2107dfed28f33abb1b16a45ad (patch)
treed9cd4c889686873d5bfe9e7b7d82b0b395526f5c /Lib/pydoc.py
parent9dd88f3f5fdc7ab6e6d303e2d84f48ea715b2ce3 (diff)
downloadcpython-4c809b14780e47b2107dfed28f33abb1b16a45ad.tar.gz
Accept patch to resolve SF bug #651124.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 5bc92494a7..8231739f75 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1299,8 +1299,6 @@ def getpager():
return plainpager
if not sys.stdin.isatty() or not sys.stdout.isatty():
return plainpager
- if os.environ.get('TERM') in ('dumb', 'emacs'):
- return plainpager
if 'PAGER' in os.environ:
if sys.platform == 'win32': # pipes completely broken in Windows
return lambda text: tempfilepager(plain(text), os.environ['PAGER'])
@@ -1308,6 +1306,8 @@ def getpager():
return lambda text: pipepager(plain(text), os.environ['PAGER'])
else:
return lambda text: pipepager(text, os.environ['PAGER'])
+ if os.environ.get('TERM') in ('dumb', 'emacs'):
+ return plainpager
if sys.platform == 'win32' or sys.platform.startswith('os2'):
return lambda text: tempfilepager(plain(text), 'more <')
if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0: