iwfm.skip_ahead¶
- iwfm.skip_ahead(line_index, all_lines, skip=0)[source]¶
Increment line_index by skipping (a) every line that begins with ‘C’, ‘c’ ‘*’ or ‘#’ and (b) ‘skip’ additional lines.
Stop if last line (all_lines) is reached
- Parameters:
- Returns:
line_index – new current line or -1 if end reached
- Return type:
- Raises:
ValueError – If line_index is negative or skip is negative
TypeError – If all_lines is not a list or line_index/skip are not integers