return the next, non-blank line, with comments stripped
(fin)
| 46 | |
| 47 | |
| 48 | def get_next_line(fin): |
| 49 | """return the next, non-blank line, with comments stripped""" |
| 50 | line = fin.readline() |
| 51 | |
| 52 | pos = line.find("#") |
| 53 | |
| 54 | while (pos == 0 or line.strip() == "") and line: |
| 55 | line = fin.readline() |
| 56 | pos = line.find("#") |
| 57 | |
| 58 | if pos == -1: |
| 59 | return line.strip() |
| 60 | return line[:pos] |
| 61 | |
| 62 | |
| 63 | def parse_param_file(params_list, param_file): |