Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Count lines of code in a Django Project

Tags:

python

django

Is there an easy way to count the lines of code you have written for your django project?

Edit: The shell stuff is cool, but how about on Windows?

like image 229
Joe Avatar asked Jul 15 '09 19:07

Joe


2 Answers

You might want to look at CLOC -- it's not Django specific but it supports Python. It can show you lines counts for actual code, comments, blank lines, etc.

like image 189
Steve Losh Avatar answered Sep 21 '22 23:09

Steve Losh


Yep:

shell]$ find /my/source -name "*.py" -type f -exec cat {} + | wc -l

Job's a good 'un.

like image 25
Aiden Bell Avatar answered Sep 21 '22 23:09

Aiden Bell