How do I calculate the number of lines written in a project containing multiple sub dirs in a python project. for example a dir structure is like
A
\ <*some files here*>\
B
\ <*some files here*>\ ... and so on...
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use the find utility in linux.
On the command prompt:
This will give you the count of all files ending with .py in the project_directory and finally the total. (I am assuming you just want the count of .py files)
If you just want the total and nothing else, you could use: