Kaydet (Commit) d404bee2 authored tarafından Skip Montanaro's avatar Skip Montanaro

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.
üst 479f3d3d
...@@ -1199,7 +1199,7 @@ def getpager(): ...@@ -1199,7 +1199,7 @@ def getpager():
return lambda text: pipepager(text, os.environ['PAGER']) return lambda text: pipepager(text, os.environ['PAGER'])
if sys.platform == 'win32' or sys.platform.startswith('os2'): if sys.platform == 'win32' or sys.platform.startswith('os2'):
return lambda text: tempfilepager(plain(text), 'more <') 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') return lambda text: pipepager(text, 'less')
import tempfile import tempfile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment