From 85a9e11cfc7731b0562a5aa5e913b9e793cc47fc Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 24 Oct 2017 10:51:14 -0400 Subject: [PATCH] Basic utils Signed-off-by: Jonathan Rajotte --- lttng_ivc/utils/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lttng_ivc/utils/utils.py diff --git a/lttng_ivc/utils/utils.py b/lttng_ivc/utils/utils.py new file mode 100644 index 0000000..20a424d --- /dev/null +++ b/lttng_ivc/utils/utils.py @@ -0,0 +1,6 @@ +def line_count(file_path): + line_count = 0 + with open(file_path) as f: + for line in f: + line_count += 1 + return line_count -- 2.34.1