source: anuga_work/production/australia_ph2/eucla_motel/file_length.py @ 6316

Last change on this file since 6316 was 6316, checked in by myall, 16 years ago

correcting name in project.py

File size: 309 bytes
Line 
1"""Function to return the length of a file.
2
3Intended to be used for simplfying the creation of boundary_tags in
4run_model.py
5
6Input: filename
7Returns: number of lines in file
8"""
9def file_length(in_file):
10    fid = open(in_file)
11    data = fid.readlines()
12    fid.close()
13    return len(data)
14
Note: See TracBrowser for help on using the repository browser.