Python script for calculating occurrences of words, verbs or function names in .py files in specified location.
Just run most_common.py with python interpreter and with desired command/arguments.
- words
$ pyhton most_common.py words --path /tmp/my-scripts --top 4
- verbs
$ pyhton most_common.py verbs --path /tmp/my-scripts
- functions
$ pyhton most_common.py functions
- Path for parsing:
--path
When not specified, current working directory is used. - Number of values in resulting set:
--top
If absent, full set will be returned.
[('path', 18), ('names', 14), ('name', 14), ('tree', 12)]