summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-09-26 21:44:57 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-09-26 21:44:57 (GMT)
commitd404bee2e2a354627ac540336408225648feffe9 (patch)
tree36f192ff1a7caf48f1f7898402ccc4abea46ef0c
parent479f3d3d2a8013a549120d8b71a0e191495599cb (diff)
downloadcpython-d404bee2e2a354627ac540336408225648feffe9.zip
cpython-d404bee2e2a354627ac540336408225648feffe9.tar.gz
cpython-d404bee2e2a354627ac540336408225648feffe9.tar.bz2
try executing 'less' in a parenthesized subshell - prevents systems like
Solaris from squawking if less isn't available. See http://python.org/sf/612111 for details.
-rwxr-xr-xLib/pydoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index d54bc22..ecee79b 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1199,7 +1199,7 @@ def getpager():
return lambda text: pipepager(text, os.environ['PAGER'])
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:
+ if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
return lambda text: pipepager(text, 'less')
import tempfile