TIL there are dozens of neat little command-line tools hidden away in the Python standard library, available to run on any machine that has a Python installation https://til.simonwillison.net/python/stdlib-cli-tools
@simon With regard to ripgrep, I think you could've done:
rg -l -g '!test*' -g '!idlelib' -g '!turtledemo' 'if __name__ ='