Michele Simionato <michele.simion...@gmail.com> writes: > I need a small utility to count the lines of Python code in a > directory, traversing subdirectories and ignoring comments and > docstrings. I am sure there is already something doing that, what do > you suggest?
Any of the static code checkers (‘pylint’, ‘pyflakes’, etc.) would already be doing this. You would at least be able to crib from them, maybe import the functionality; ideally they can directly report what you want to see. -- \ “My business is to teach my aspirations to conform themselves | `\ to fact, not to try and make facts harmonise with my | _o__) aspirations.“ —Thomas Henry Huxley, 1860-09-23 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list