mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user