replaced removed pager_print for print

This commit is contained in:
Brian Coca 2015-06-16 09:19:37 -04:00
parent 98f5534d9c
commit 9116ff1c28

View file

@ -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):