The `python` command may not exist on a system with Python 3 installed.
See https://peps.python.org/pep-0394/ for a discussion of the commands
expected to be installed.
Since Python2 was officially sunsetted almost three years ago
(https://www.python.org/doc/sunset-python-2/), IWYU should prefer
compatibility with newer systems over older ones.
Python code in scripts is still Python3/Python2-compatible, but we will no
longer make an effort to preserve Python2 support over time.
Fixes#1096.
Use the fileinput module to take input from stdin or a named file.
This enables:
$ include-what-you-use -Xiwyu -v7 file.cc 2>&1 | ./scrub-logs.py
which is very useful for comparing execution flows.
Clang sometimes forgets to put in a space between pointer values and the
trailing identifier (`nullptr`), so remove the trailing word boundary
requirement from pointer detection.