I'm trying to run a PEP8 check against a large source tree. The tree is comprised of a mix of files in various languages. The idea is to check all the Python scripts without having to explicitly list them. The majority of these files don't actually have a .py extension. Is there a simple way to find all files with the word Python in the shebang or find all files that would be run with Python when executed?
|
|
||||
|
|
|
|
|||||
|
|
With GNU, or FreeBSD or NetBSD or OpenBSD (and potentially others)
Would look only at the first line of each file and would run as few The While the code above would appear to work in other implementations as well, the If your
Which would still run as few Another alternative to avoid reading the files fully and that would work with every
|
|||||||
|

