JDevlieghere added a comment. Another nice addition here would be checking if stdout is a tty (`sys.stdout.isatty()`) and continuing to use the textual format if it isn't. A quick experiment seems to show this does the right thing from inside LLDB:
$ echo -e "script\nimport sys\nsys.stdout.isatty()" | lldb -b (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> >>> True now exiting InteractiveConsole... $ echo -e "script\nimport sys\nsys.stdout.isatty()" | lldb -b | tail Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. now exiting InteractiveConsole... (lldb) script >>> >>> False ================ Comment at: lldb/examples/python/crashlog.py:1302 + print("Aborting symbolication.") + print() + option_parser.print_help() ---------------- Spurious print? It doesn't look like we're printing a double newline elsewhere. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141658/new/ https://reviews.llvm.org/D141658 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits