recipes.get_numlines

recipes.get_numlines(fname)[source]

Get number of lines of an text file

Parameters:

fname : str

File to be read

Returns:

lineno : int

Number of lines in the file

See also

None

Notes

This routine is based on this Stackoverflow submission