Last change
on this file since 6498 was
6322,
checked in by ole, 16 years ago
|
Added file length, changed resolution in time and space.
|
File size:
309 bytes
|
Rev | Line | |
---|
[6322] | 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.