Logical lines of code counter

Tim Leslie tim.leslie at gmail.com
Sun Aug 22 23:01:44 EDT 2004


If you want something which can do this and so much more, have a look at pylint.

http://www.logilab.org/projects/pylint

Cheers,

Tim

On Sun, 22 Aug 2004 21:44:17 -0400, Leif K-Brooks <eurleif at ecritters.biz> wrote:
> I got bored with working on larger projects and wrote a little
> script/module for counting logical (not physical) lines of Python code
> in a file or directory. It uses ASTs generated by compiler.parse instead
> of text manipulation functions, so it isn't incredibly fast, but the
> speed is good enough to be usable for me.
> 
> If you want to take a look, the file is at
> <http://ecritters.biz/linecount.py>. I don't really care about how
> people license their modifications (and the GPL is longer than the
> script itself), so it's licensed under the MIT License.
> 
> I'm sure there are a few bugs (AST nodes I forgot to count?), and I'd
> appreciate being emailed if anyone finds one.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list