Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MyGUI/mygui
/ countLines
Function
countLines
Scripts/count_lines.py:6–12 ·
view source on GitHub ↗
(fileName)
Source
from the content-addressed store, hash-verified
4
5
6
def
countLines(fileName):
7
file = open(fileName,
'r'
)
8
count = 0
9
while
file.readline() !=
""
:
10
count = count + 1
11
file.close()
12
return
count
13
14
15
def
CountLinesInFolder(dir_src):
Callers
1
CountLinesInFolder
Function · 0.85
Calls
3
open
Function · 0.85
readline
Method · 0.45
close
Method · 0.45
Tested by
no test coverage detected