original_docstring: Page through text by invoking a program on a temporary file.
docstring: Page through text by invoking a program on a temporary file.
docstring_tokens: Page through text by invoking a program on a temporary file .
code: def _tempfilepager(text, cmd, color):
      """Page through text by invoking a program on a temporary file."""
      import tempfile
      filename = tempfile.mktemp()
      if not color:
          text = strip_ansi(text)
      encoding = get_best_encoding(sys.stdout)
      with open_stream(filename, 'wb')[0] as f:
          f.write(text.encode(encoding))
      try:
          os.system(cmd + ' "' + filename + '"')
      finally:
          os.unlink(filename)
code_tokens: def _tempfilepager ( text , cmd , color ) : import tempfile filename = tempfile . mktemp ( ) if not color : text = strip_ansi ( text ) encoding = get_best_encoding ( sys . stdout ) with open_stream ( filename , 'wb' ) [ 0 ] as f : f . write ( text . encode ( encoding ) ) try : os . system ( cmd + ' "' + filename + '"' ) finally : os . unlink ( filename )
short_docstring: Page through text by invoking a program on a temporary file.
short_docstring_tokens: Page through text by invoking a program on a temporary file .
comment: """Page through text by invoking a program on a temporary file."""