Commit 9116ff1c by Brian Coca

replaced removed pager_print for print

parent 98f5534d
...@@ -415,16 +415,16 @@ class CLI(object): ...@@ -415,16 +415,16 @@ class CLI(object):
''' find reasonable way to display text ''' ''' find reasonable way to display text '''
# this is a much simpler form of what is in pydoc.py # this is a much simpler form of what is in pydoc.py
if not sys.stdout.isatty(): if not sys.stdout.isatty():
pager_print(text) print(text)
elif 'PAGER' in os.environ: elif 'PAGER' in os.environ:
if sys.platform == 'win32': if sys.platform == 'win32':
pager_print(text) print(text)
else: else:
CLI.pager_pipe(text, os.environ['PAGER']) CLI.pager_pipe(text, os.environ['PAGER'])
elif subprocess.call('(less --version) 2> /dev/null', shell = True) == 0: elif subprocess.call('(less --version) 2> /dev/null', shell = True) == 0:
CLI.pager_pipe(text, 'less') CLI.pager_pipe(text, 'less')
else: else:
pager_print(text) print(text)
@staticmethod @staticmethod
def pager_pipe(text, cmd): def pager_pipe(text, cmd):
......
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