Skip to content

Instantly share code, notes, and snippets.

@horvatha
Created August 13, 2020 10:12
Show Gist options
  • Save horvatha/04ef0388aaebec9ac5033f85ccde99c3 to your computer and use it in GitHub Desktop.
Save horvatha/04ef0388aaebec9ac5033f85ccde99c3 to your computer and use it in GitHub Desktop.
for root, _, files in os.walk("."):
print('root: ', root)
for file in files:
if file.endswith(".py"):
with open(os.path.join(root, file)) as f:
b = f.read()
print(file, b.count('\n'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment