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 | |
---|---|
File size: 309 bytes |
Line | |
---|---|
1 | """Function to return the length of a file. |
2 | |
3 | Intended to be used for simplfying the creation of boundary_tags in |
4 | run_model.py |
5 | |
6 | Input: filename |
7 | Returns: number of lines in file |
8 | """ |
9 | def 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.