Counts the number of lines for file at path. Args: path: full path to file Returns: number of lines
(path)
| 14 | |
| 15 | @staticmethod |
| 16 | def linecount(path): |
| 17 | """ |
| 18 | Counts the number of lines for file at path. |
| 19 | |
| 20 | Args: |
| 21 | path: full path to file |
| 22 | |
| 23 | Returns: |
| 24 | number of lines |
| 25 | """ |
| 26 | |
| 27 | with open(path, "r", encoding="utf-8") as f: |
| 28 | return len(f.readlines()) |
no outgoing calls